/* ==========================================================================
   퇴근후 오토랩 — AfterWork AutoLab
   화이트 + 네이비 매거진 스타일 / 라이트·다크 대응 / 반응형
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-elev: #ffffff;
  --bg-tint: #eef3fb;
  --ink: #0d1b2a;
  --ink-soft: #3f5165;
  --ink-mute: #6c7f94;
  --navy: #0e2239;
  --line: #e2e8f0;
  --line-strong: #c9d4e2;
  --accent: #2a5bd7;
  --accent-ink: #1b3f9e;
  --accent-soft: #e8effc;
  --mint: #0f766e;
  --amber: #9a5b00;
  --rose: #b42318;
  --btn-bg: #0e2239;
  --btn-ink: #ffffff;
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, .06), 0 1px 3px rgba(13, 27, 42, .04);
  --shadow-md: 0 8px 24px rgba(13, 27, 42, .08);
  --shadow-lg: 0 18px 48px rgba(13, 27, 42, .12);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --container: 1120px;
  --narrow: 780px;
}

[data-theme="dark"] {
  --bg: #0b1522;
  --bg-soft: #101d2c;
  --bg-elev: #132234;
  --bg-tint: #13263c;
  --ink: #e9f0f8;
  --ink-soft: #b7c6d8;
  --ink-mute: #8b9cb1;
  --navy: #dce7f5;
  --line: #22344a;
  --line-strong: #2f4660;
  --accent: #7ba4ff;
  --accent-ink: #a9c4ff;
  --accent-soft: #16273d;
  --mint: #5eead4;
  --amber: #fbbf24;
  --rose: #fca5a5;
  --btn-bg: #7ba4ff;
  --btn-ink: #081320;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1522;
    --bg-soft: #101d2c;
    --bg-elev: #132234;
    --bg-tint: #13263c;
    --ink: #e9f0f8;
    --ink-soft: #b7c6d8;
    --ink-mute: #8b9cb1;
    --navy: #dce7f5;
    --line: #22344a;
    --line-strong: #2f4660;
    --accent: #7ba4ff;
    --accent-ink: #a9c4ff;
    --accent-soft: #16273d;
    --mint: #5eead4;
    --amber: #fbbf24;
    --rose: #fca5a5;
    --btn-bg: #7ba4ff;
  --btn-ink: #081320;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .45);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.3; letter-spacing: -0.025em; color: var(--navy); margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
}
.container-narrow { max-width: var(--narrow); }

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--navy); color: #fff;
  padding: 10px 16px; border-radius: 8px; z-index: 200;
  transition: top .2s;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  height: 66px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); display: flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; font-weight: 800; letter-spacing: -0.03em; }
.brand-text em { font-style: normal; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; }
.site-nav a {
  display: block; padding: 8px 11px; border-radius: 8px;
  color: var(--ink-soft); font-size: 14.5px; font-weight: 600; text-decoration: none;
  transition: background .15s, color .15s;
}
.site-nav a:hover { background: var(--bg-soft); color: var(--navy); text-decoration: none; }
.site-nav a.is-active { color: var(--accent); background: var(--accent-soft); }

.header-tools { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-elev);
  color: var(--ink-soft); cursor: pointer; transition: .15s;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--navy); }
.nav-toggle { display: none; }

/* ---------- 공통 ---------- */
.eyebrow {
  font-size: 12.5px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
}
.accent { color: var(--accent); }
.text-link { font-weight: 700; font-size: 14.5px; color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--btn-bg); filter: brightness(1.12); box-shadow: var(--shadow-md); }
.btn-ghost { background: var(--bg-elev); border-color: var(--line-strong); color: var(--navy); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.chip {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .01em;
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid transparent;
}
.chip-coupang { background: #fff3e6; color: #9a4a00; }
.chip-ai-automation { background: #e9f0ff; color: #1c3f9c; }
.chip-content-ops { background: #e8f7f3; color: #0b6b55; }
.chip-tools { background: #f1ecff; color: #5b34b8; }
[data-theme="dark"] .chip-coupang { background: #3a2410; color: #ffbe73; }
[data-theme="dark"] .chip-ai-automation { background: #16263f; color: #9dbbff; }
[data-theme="dark"] .chip-content-ops { background: #10302a; color: #74e0c6; }
[data-theme="dark"] .chip-tools { background: #241b3f; color: #c1a6ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip-coupang { background: #3a2410; color: #ffbe73; }
  :root:not([data-theme="light"]) .chip-ai-automation { background: #16263f; color: #9dbbff; }
  :root:not([data-theme="light"]) .chip-content-ops { background: #10302a; color: #74e0c6; }
  :root:not([data-theme="light"]) .chip-tools { background: #241b3f; color: #c1a6ff; }
}

.tag {
  display: inline-block; font-size: 12.5px; color: var(--ink-mute);
  text-decoration: none;
}
.tag:hover { color: var(--accent); }

/* ---------- 히어로 ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 420px at 12% -10%, rgba(42, 91, 215, .12), transparent 65%),
    radial-gradient(900px 400px at 92% 0%, rgba(15, 118, 110, .10), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding: 78px 22px 64px; max-width: 900px; }
.hero h1 {
  margin: 16px 0 0;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 850; letter-spacing: -0.04em; line-height: 1.18;
}
.hero-lead {
  margin-top: 20px; max-width: 660px;
  font-size: clamp(15.5px, 1.6vw, 18px); color: var(--ink-soft); line-height: 1.75;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 14px 44px;
  margin: 44px 0 0; padding-top: 26px; border-top: 1px dashed var(--line-strong);
}
.hero-stats dt { font-size: 13px; color: var(--ink-mute); font-weight: 600; }
.hero-stats dd { margin: 4px 0 0; font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -0.03em; }

/* ---------- 섹션 ---------- */
.section { padding: 68px 0; }
.section-tint { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 28px;
}
.section-head h2 { font-size: clamp(23px, 2.6vw, 30px); font-weight: 820; }

/* ---------- 필터 ---------- */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filter-btn {
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--bg-elev);
  color: var(--ink-soft); font-size: 13.5px; font-weight: 700;
  transition: .15s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.is-active { background: var(--navy); border-color: var(--navy); color: var(--bg); }
.filter-empty { margin-top: 22px; color: var(--ink-mute); }

/* ---------- 글 카드 ---------- */
.post-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}
.post-card {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  overflow: hidden;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.post-card-link { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 20px; height: 100%; color: inherit; text-decoration: none; }
.post-card-link:hover { text-decoration: none; }
.post-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.post-card-type { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); }
.post-card h3 { font-size: 19px; font-weight: 800; line-height: 1.42; letter-spacing: -0.03em; }
.post-card-desc {
  font-size: 14.5px; color: var(--ink-soft); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-meta { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--ink-mute); }
.post-card-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 카테고리 카드 ---------- */
.cat-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cat-card {
  position: relative; padding: 24px 22px 46px; border-radius: var(--radius);
  background: var(--bg-elev); border: 1px solid var(--line);
  color: inherit; text-decoration: none; transition: .18s;
}
.cat-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cat-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.cat-card p { font-size: 14px; color: var(--ink-soft); line-height: 1.65; }
.cat-count { position: absolute; left: 22px; bottom: 18px; font-size: 12.5px; font-weight: 800; color: var(--accent); }

/* ---------- 도구 배너 ---------- */
.tool-banner {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center;
  padding: 42px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0e2239 0%, #17395f 55%, #1d4a7a 100%);
  color: #eaf1fa; box-shadow: var(--shadow-lg); overflow: hidden;
}
.tool-banner h2 { color: #fff; font-size: clamp(24px, 2.8vw, 32px); margin: 10px 0 12px; font-weight: 820; }
.tool-banner p { color: #c7d7ea; font-size: 15px; line-height: 1.7; }
.tool-banner .eyebrow { color: #7fb0ff; }
.tool-banner .btn-primary { background: #fff; color: #0e2239; margin-top: 22px; }
.tool-banner .btn-primary:hover { background: #e8effc; }
.mock-calc {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px; padding: 20px; backdrop-filter: blur(6px);
}
.mock-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 8px 0; color: #c7d7ea; border-bottom: 1px dashed rgba(255,255,255,.12); }
.mock-row strong { color: #fff; font-variant-numeric: tabular-nums; }
.mock-row-total { border-bottom: 0; color: #fff; font-weight: 800; }
.mock-row-total strong { color: #7ee5c8; }
.mock-bar { height: 8px; background: rgba(255,255,255,.14); border-radius: 99px; margin: 14px 0 10px; overflow: hidden; }
.mock-bar span { display: block; height: 100%; background: linear-gradient(90deg, #5eead4, #7fb0ff); border-radius: 99px; }
.mock-caption { font-size: 12.5px; color: #a9c0d8; }

/* ---------- 원칙 ---------- */
.principle-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.principle { padding: 24px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); }
.principle h3 { font-size: 16.5px; font-weight: 800; margin-bottom: 8px; }
.principle p { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- 페이지 헤드 ---------- */
.page-head { padding: 54px 0 30px; background: var(--bg); border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 10px 0 0; font-size: clamp(28px, 4vw, 42px); font-weight: 850; letter-spacing: -0.04em; }
.page-lead { margin-top: 14px; font-size: 16.5px; color: var(--ink-soft); max-width: 700px; line-height: 1.7; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-mute); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-mute); }
.breadcrumb a:hover { color: var(--accent); }
.page-404 .page-head { padding: 90px 0 80px; }

/* ---------- 글 본문 ---------- */
.post-head { padding: 44px 0 30px; border-bottom: 1px solid var(--line); }
.post-head h1 {
  margin: 14px 0 0; font-size: clamp(27px, 3.6vw, 40px);
  font-weight: 850; letter-spacing: -0.04em; line-height: 1.28;
}
.post-desc { margin-top: 16px; font-size: 16.5px; color: var(--ink-soft); line-height: 1.72; }
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin-top: 22px; font-size: 13.5px; color: var(--ink-mute);
}
.post-type { padding: 2px 9px; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; padding-top: 44px; padding-bottom: 70px; }
.post-main { min-width: 0; }
.post-side { position: relative; }
.post-side-inner { position: sticky; top: 90px; }

.toc {
  position: sticky; top: 90px;
  padding: 18px 18px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-soft); margin-bottom: 18px;
}
.toc-title { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 10px; }
.toc ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.toc a { font-size: 13.5px; color: var(--ink-soft); display: block; padding: 3px 0; line-height: 1.45; }
.toc a:hover { color: var(--accent); }
.toc .toc-lv3 a { padding-left: 12px; font-size: 13px; color: var(--ink-mute); }

.side-card { padding: 18px; border-radius: var(--radius-sm); border: 1px dashed var(--line-strong); font-size: 13.5px; color: var(--ink-soft); line-height: 1.65; }
.side-card .eyebrow { display: block; margin-bottom: 8px; }
.side-card .text-link { display: inline-block; margin-top: 10px; }

.prose { font-size: 16.5px; line-height: 1.82; color: var(--ink-soft); }
.prose > * + * { margin-top: 18px; }
.prose h2 {
  margin-top: 52px; padding-top: 8px;
  font-size: clamp(22px, 2.6vw, 27px); font-weight: 820; color: var(--navy);
  letter-spacing: -0.03em; scroll-margin-top: 90px;
}
.prose h3 { margin-top: 34px; font-size: 19.5px; font-weight: 800; color: var(--navy); scroll-margin-top: 90px; }
.prose h4 { margin-top: 26px; font-size: 17px; font-weight: 800; color: var(--navy); }
.prose p { margin: 0; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.prose li::marker { color: var(--accent); }
.prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul { margin-top: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose blockquote {
  margin: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent);
  color: var(--ink-soft); font-style: normal;
}
.prose .code-inline {
  font-family: var(--mono); font-size: .88em; padding: 2px 6px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; color: var(--accent-ink);
}
.prose .anchor { margin-left: 8px; color: var(--line-strong); font-weight: 400; text-decoration: none; opacity: 0; transition: opacity .15s; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-elev); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
.prose th, .prose td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); font-weight: 800; color: var(--navy); font-size: 13.5px; white-space: nowrap; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover td { background: var(--bg-soft); }

.code-block { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #0d1b2a; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: rgba(255,255,255,.05); border-bottom: 1px solid rgba(255,255,255,.08); }
.code-lang { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: #8ea6c0; }
.copy-btn {
  border: 1px solid rgba(255,255,255,.18); background: transparent; color: #c7d7ea;
  font-size: 12px; padding: 4px 10px; border-radius: 6px; cursor: pointer;
}
.copy-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.code-block pre { margin: 0; padding: 16px; overflow-x: auto; }
.code-block code { font-family: var(--mono); font-size: 13.5px; line-height: 1.7; color: #e3eefb; }

.callout {
  padding: 18px 20px; border-radius: var(--radius-sm);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: 15.5px; color: var(--ink-soft);
}
.callout > * + * { margin-top: 10px; }
.callout-title { font-weight: 800; color: var(--accent-ink); font-size: 14.5px; }
.callout-warning { background: #fff7e6; border-color: #f3d9a4; }
.callout-warning .callout-title { color: var(--amber); }
.callout-tip { background: #ecf8f4; border-color: #b9e6d8; }
.callout-tip .callout-title { color: var(--mint); }
.callout-check { background: #f4f1ff; border-color: #d8ccff; }
.callout-check .callout-title { color: #5b34b8; }
[data-theme="dark"] .callout-warning { background: #2c2110; border-color: #4d3a14; }
[data-theme="dark"] .callout-tip { background: #102a26; border-color: #1c4b40; }
[data-theme="dark"] .callout-check { background: #1e1833; border-color: #362b58; }

.prose figure { margin: 30px 0; }
.prose figure img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-elev); }
.prose figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-mute); text-align: center; line-height: 1.6; }

.task-list { list-style: none; padding-left: 0 !important; }
.task-list li.task { display: flex; gap: 10px; align-items: flex-start; }
.task-list input[type="checkbox"] { margin-top: 6px; width: 16px; height: 16px; accent-color: var(--accent); }

.post-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }

.inline-tool {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  margin-top: 34px; padding: 24px; border-radius: var(--radius);
  background: var(--bg-tint); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}
.inline-tool h3 { font-size: 17.5px; margin: 6px 0 6px; }
.inline-tool p { font-size: 14px; color: var(--ink-soft); max-width: 480px; }

.post-related { margin-top: 44px; }
.post-related h2 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.post-related ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.post-related a {
  display: flex; gap: 10px; align-items: baseline; padding: 12px 0;
  border-bottom: 1px dashed var(--line); color: var(--ink); font-size: 15px; font-weight: 600;
}
.post-related a:hover { color: var(--accent); text-decoration: none; }
.rel-cat { flex: none; font-size: 11.5px; font-weight: 800; color: var(--ink-mute); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.post-nav a {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); color: inherit;
  background: var(--bg-elev); transition: .15s;
}
.post-nav a:hover { border-color: var(--accent); text-decoration: none; }
.post-nav span { font-size: 12px; color: var(--ink-mute); font-weight: 700; }
.post-nav strong { font-size: 14.5px; line-height: 1.5; }
.post-nav-next { text-align: right; }

/* ---------- 계산기 ---------- */
.section-calc { padding-top: 40px; }
.calc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.calc-form {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.calc-form fieldset { border: 0; padding: 0; margin: 0 0 26px; }
.calc-form fieldset:last-of-type { margin-bottom: 8px; }
.calc-form legend {
  font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px; padding: 0;
}
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 13px; font-size: 16px; font-variant-numeric: tabular-nums;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--bg); color: var(--ink); font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.field-help { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-mute); line-height: 1.55; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.calc-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.calc-result {
  background: linear-gradient(160deg, #0e2239 0%, #14304f 100%);
  color: #e8eff9; border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow-lg); position: sticky; top: 90px;
}
.calc-result .eyebrow { color: #7fb0ff; }
.result-profit { font-size: clamp(30px, 3.4vw, 40px); font-weight: 850; letter-spacing: -0.03em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.result-margin { font-size: 14.5px; color: #b9cde4; }
.verdict {
  display: inline-block; margin-top: 12px; padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; background: rgba(255,255,255,.12); color: #fff;
}
.verdict.good { background: rgba(94, 234, 212, .18); color: #7ee5c8; }
.verdict.warn { background: rgba(251, 191, 36, .18); color: #fcd34d; }
.verdict.bad { background: rgba(248, 113, 113, .2); color: #fca5a5; }
.result-rows { margin-top: 24px; padding-top: 8px; border-top: 1px dashed rgba(255,255,255,.18); }
.result-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14px; color: #b9cde4; border-bottom: 1px dashed rgba(255,255,255,.09); }
.result-row strong { color: #fff; font-variant-numeric: tabular-nums; font-weight: 700; }
.result-row-total { border-bottom: 0; padding-top: 13px; font-weight: 800; color: #fff; }
.result-row-total strong { color: #7ee5c8; font-size: 17px; }
.result-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; margin: 18px 0 8px; background: rgba(255,255,255,.1); }
.result-bar span { display: block; height: 100%; transition: width .3s ease; }
.bar-cost { background: #7f97b3; }
.bar-logi { background: #4f8ff7; }
.bar-ad { background: #b07cff; }
.bar-profit { background: #5eead4; }
.bar-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; color: #a9c0d8; }
.bar-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.lg-cost::before { background: #7f97b3; }
.lg-logi::before { background: #4f8ff7; }
.lg-ad::before { background: #b07cff; }
.lg-profit::before { background: #5eead4; }
.result-break { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); }
.result-break span { display: block; font-size: 11.5px; color: #a9c0d8; margin-bottom: 4px; }
.result-break strong { font-size: 15.5px; color: #fff; font-variant-numeric: tabular-nums; }
.result-note { margin-top: 20px; font-size: 11.5px; color: #8ea6c0; line-height: 1.6; }

/* ---------- 푸터 ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 56px 0 28px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-brand p { margin-top: 12px; font-size: 14px; color: var(--ink-soft); max-width: 420px; line-height: 1.7; }
.footer-note { font-size: 12.5px !important; color: var(--ink-mute) !important; }
.footer-col h3 { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 14px; color: var(--ink-soft); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-mute);
}

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .post-side { order: -1; margin-bottom: 26px; }
  .toc { position: static; }
  .calc-layout { grid-template-columns: minmax(0, 1fr); }
  .calc-result { position: static; }
  .tool-banner { grid-template-columns: 1fr; padding: 32px; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 66px; left: 0; right: 0;
    background: var(--bg-elev); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); padding: 10px 16px 16px; display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 12px 12px; font-size: 15px; }
  .header-inner { gap: 10px; }
  .brand-text em { display: none; }
  .hero-inner { padding: 56px 22px 48px; }
  .section { padding: 52px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { text-align: left; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .prose { font-size: 16px; }
  .post-layout { padding-top: 32px; }
  .result-break { grid-template-columns: 1fr; }
  .hero-stats { gap: 12px 28px; }
  .hero-stats dd { font-size: 19px; }
  .calc-form, .calc-result { padding: 20px; }
  .post-card-link { padding: 20px; }
}

@media print {
  .site-header, .site-footer, .post-side, .post-related, .post-nav, .inline-tool, .filter-row { display: none; }
  .post-layout { grid-template-columns: 1fr; }
  body { background: #fff; color: #000; }
}
