/* 구독다이어트 — 표준 CSS만 사용 (빌드 도구 없음) */
:root {
  --brand: #0f766e;
  --brand-solid: #0f766e; /* 흰 글자를 올리는 배경 전용: 다크 모드에서도 대비 5.4:1 유지 */
  --brand-solid-hover: #115e59;
  --brand-dark: #115e59;
  --brand-soft: #e6f6f3;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #475569;
  --line: #d9e2ec;
  --bg: #ffffff;
  --bg-2: #f6f8fa;
  --link: #0f766e;
  --ok: #166534; --ok-bg: #dcfce7;
  --mid: #854d0e; --mid-bg: #fef3c7;
  --low: #991b1b; --low-bg: #fee2e2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #14b8a6;
    --brand-dark: #5eead4;
    --brand-soft: #0f2e2b;
    --ink: #e5e7eb;
    --ink-2: #cbd5e1;
    --muted: #9aa8b8;
    --line: #273449;
    --bg: #0b1220;
    --bg-2: #111a2c;
    --link: #5eead4;
    --ok: #bbf7d0; --ok-bg: #14532d;
    --mid: #fde68a; --mid-bg: #5b3d0a;
    --low: #fecaca; --low-bg: #6b1a1a;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); font-size: 14px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* 헤더·내비 */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-top: 10px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; }
.logo-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--brand-solid); color: #fff; font-size: 17px; font-weight: 900; }
.nav { display: flex; gap: 2px; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--brand-dark); background: var(--brand-soft); }

.disclosure { background: var(--bg-2); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.disclosure .wrap { padding-top: 8px; padding-bottom: 8px; }
.crumbs { margin: 16px 0 4px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* 본문 타이포 */
main { padding-bottom: 24px; }
h1 { font-size: 1.65rem; line-height: 1.35; letter-spacing: -.01em; margin: 12px 0 8px; }
h2 { font-size: 1.28rem; line-height: 1.4; margin: 2.1em 0 .6em; }
h3 { font-size: 1.08rem; margin: 1.4em 0 .4em; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin: .3em 0; }
.lead { font-size: 1.06rem; color: var(--ink-2); }
.meta { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
@media (min-width: 720px) { h1 { font-size: 2rem; } }

/* 박스 */
.summary-box, .callout, .related, .trust { border-radius: var(--radius); padding: 16px 18px; margin: 20px 0; }
.summary-box { background: var(--brand-soft); border: 1px solid var(--line); }
.summary-box h2, .callout h2, .related h2, .trust h2 { margin-top: 0; font-size: 1.12rem; }
.summary-box ul { margin-bottom: 0; }
.callout { border: 2px solid var(--brand); background: var(--bg); }
.related, .trust { background: var(--bg-2); border: 1px solid var(--line); }
.method { border-left: 4px solid var(--brand); background: var(--bg-2); padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; margin: 12px 0; }
.method h3 { margin-top: 0; }
.method p:last-child { margin-bottom: 0; }
.method.warn { border-left-color: #d97706; }
/* 오래된 요금 안내 (app.js initStale) */
.stale-note { border: 2px solid #d97706; background: var(--mid-bg); color: var(--mid); border-radius: var(--radius); padding: 12px 16px; margin: 12px 0 20px; }
.stale-note a { color: inherit; font-weight: 700; }

/* 표 */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0 20px; }
table.cmp { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
table.cmp th, table.cmp td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.cmp thead th { background: var(--bg-2); font-size: 14px; color: var(--ink-2); white-space: nowrap; }
table.cmp tbody tr:last-child th, table.cmp tbody tr:last-child td { border-bottom: 0; }
table.cmp tbody th { font-weight: 700; }
table.cmp td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.mid { background: var(--mid-bg); color: var(--mid); }
.badge.low { background: var(--low-bg); color: var(--low); }
.tag { display: inline-block; padding: 0 7px; margin-right: 2px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg); }

/* 휴대폰: 표를 행 단위 카드로 (data-label 은 표 컴포넌트와 Markdown 표 플러그인이 thead 에서 복사) */
@media (max-width: 640px) {
  .table-wrap:has(table.stack) { border: 0; border-radius: 0; overflow: visible; }
  table.cmp.stack { min-width: 0; }
  table.cmp.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.cmp.stack, table.cmp.stack tbody, table.cmp.stack tr, table.cmp.stack th, table.cmp.stack td { display: block; width: 100%; }
  table.cmp.stack tr { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: 6px 14px 8px; margin: 0 0 10px; }
  table.cmp.stack tbody th { padding: 6px 0 8px; border-bottom: 1px solid var(--line); font-size: 16px; }
  table.cmp.stack td { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
  table.cmp.stack tbody tr td:last-child { border-bottom: 0; }
  table.cmp.stack td::before { content: attr(data-label); flex: 0 0 34%; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.7; }
  table.cmp.stack td.num { white-space: normal; }
}

/* 카드 그리드 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 12px 0 20px; }
.card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-1px); }
.card strong { font-size: 17px; }
.card .muted { font-size: 13px; line-height: 1.5; }
.card .price { margin-top: 6px; font-weight: 800; color: var(--brand-dark); font-size: 14px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; margin: 4px 4px 4px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { border-color: var(--brand); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-solid); border-color: var(--brand-solid); color: #fff; }
.btn-primary:hover { background: var(--brand-solid-hover); border-color: var(--brand-solid-hover); color: #fff; }

/* 목록·단계 */
.list { list-style: none; padding: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.list li a { font-weight: 700; }
.list .muted { display: block; }
ol.steps { list-style: none; counter-reset: step; padding: 0; }
ol.steps > li { counter-increment: step; position: relative; padding: 4px 0 4px 40px; margin: 10px 0; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 4px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-solid); color: #fff; font-size: 14px; font-weight: 800; display: grid; place-items: center; line-height: 1; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0; background: var(--bg); }
.faq summary { display: flex; align-items: center; min-height: 48px; padding: 8px 16px; cursor: pointer; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; padding-left: 12px; color: var(--muted); font-size: 20px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 16px 14px; margin: 0; color: var(--ink-2); }

/* 광고: 체크리스트 3-4 여백, 3-6 넘침 방지 */
.manual-ad-box { overflow: hidden; text-align: center; }
.manual-ad-box.ad-top { margin: 8px auto 16px; min-height: 50px; }
.manual-ad-box.ad-bottom { margin: 24px auto 16px; }
.manual-ad-box ins.adsbygoogle { max-width: 100% !important; }
.manual-ad-box ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.manual-ad-box:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.ad-label { display: block; font-size: 11px; color: var(--muted); letter-spacing: .05em; margin-bottom: 2px; }

/* 홈 */
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: 1.9rem; margin-bottom: 10px; }
.hero p { font-size: 1.06rem; color: var(--ink-2); }
@media (min-width: 720px) { .hero h1 { font-size: 2.4rem; } }
.two { display: grid; gap: 0 32px; }
@media (min-width: 720px) { .two { grid-template-columns: 1fr 1fr; } }

/* 도구 */
.tool { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 16px; margin: 16px 0 20px; }
.tool fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); margin: 0 0 12px; padding: 8px 14px 10px; min-width: 0; }
.tool legend { font-weight: 800; padding: 0 6px; }
.calc-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.calc-row:last-child { border-bottom: 0; }
.calc-row label { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; cursor: pointer; }
.calc-row select { flex: 1 1 220px; max-width: 100%; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); flex: none; }
select { font: inherit; font-size: 16px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.result { border-radius: var(--radius); background: var(--brand-soft); border: 1px solid var(--line); padding: 16px 18px; margin-top: 16px; }
.result .total { margin: 0; font-size: 1.05rem; }
.result .total strong { display: block; font-size: 2.2rem; font-weight: 900; line-height: 1.2; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.result .total-sub { margin: 4px 0 8px; color: var(--ink-2); }
.receipt { list-style: none; padding: 0; margin: 8px 0 12px; border-top: 1px dashed var(--line); }
.receipt li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); margin: 0; font-size: 15px; }
.receipt li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.tips-title { font-weight: 800; margin: 12px 0 4px; }
.tips { margin-bottom: 8px; }
.tips li { font-size: 15px; }
.actions { margin: 12px 0 0; }
.opt { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; margin: 4px 6px 4px 0; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); cursor: pointer; font-weight: 600; }
.opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.picks { display: grid; gap: 12px; margin-top: 16px; }
.pick { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: 14px 16px; }
.pick.top { border: 2px solid var(--brand); }
.pick h3 { margin: 0 0 4px; font-size: 1.15rem; }
.pick .rank { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 999px; background: var(--brand-solid); color: #fff; font-size: 13px; }
.pick p { margin: 4px 0; }
.pick .warn { color: var(--mid); font-size: 14px; }

/* 쿠폰 코드 */
.codebox { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border: 2px dashed var(--brand); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; background: var(--brand-soft); }
.codebox .code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.5rem; font-weight: 800; letter-spacing: .06em; }
.codebox .muted { flex-basis: 100%; margin: 0; }

/* 토스트 */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 1000; transform: translate(-50%, 8px); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 10px; background: #0f172a; color: #fff; font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 푸터 */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 40px; padding: 20px 0 28px; font-size: 14px; }
.site-footer p { margin: 0 0 6px; }
.foot-links a { color: var(--ink-2); display: inline-block; padding: 6px 0; }

@media print {
  .site-header .nav, .manual-ad-box, .disclosure, .site-footer, .toast { display: none !important; }
}
