/* 살림 백과 — 분리배출·세탁·청소·식품 보관 칼럼. 생활정책 노트 틀을 색만 바꿔 쓴다. */
:root {
  --paper: #ffffff;
  --ink: #1b2430;        /* 푸른 먹색 — 본문 */
  --mute: #5d6773;
  --line: #dde3ea;
  --green: #1f5f8b;      /* 물빛 파랑 — 강조색 하나(변수 이름은 틀 그대로) */
  --tint: #e9f1f7;       /* 요약·기준 상자 */
  --stamp: #c8372d;      /* 인주색 — 신청 기간 도장에만 */
  --r: 10px;
  --w: 1180px;
  --display: "Wanted Sans Variable", "Wanted Sans", "Pretendard Variable", Pretendard, sans-serif;
  --body: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.7 var(--body); word-break: keep-all; overflow-wrap: break-word; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.wrap { width: min(var(--w), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }

/* ── 머리 ── */
.site-head { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { font: 800 19px/1 var(--display); letter-spacing: -.02em; text-decoration: none; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand-mark { width: 22px; height: 22px; border: 2px solid var(--green); border-radius: 5px; position: relative; }
.brand-mark::after { content: ""; position: absolute; left: 4px; right: 4px; top: 5px; height: 2px; background: var(--green); box-shadow: 0 5px 0 var(--green), 0 10px 0 var(--green); width: 60%; }
.nav { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav li { list-style: none; display: contents; }
.nav .current-menu-item > a { color: var(--ink); box-shadow: inset 0 -2px 0 var(--green); }
.chips .page-numbers { display: block; text-decoration: none; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--mute); background: #f3f6f4; }
.chips .page-numbers.current { background: var(--ink); color: #fff; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 600; color: var(--mute); white-space: nowrap; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--green); }
.search-btn { margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 999px; background: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }

/* ── 첫 화면: 지금 신청할 수 있는 제도 ── */
.intro { padding: 56px 0 28px; }
.intro h1 { font: 800 clamp(28px, 4.2vw, 44px)/1.25 var(--display); letter-spacing: -.035em; margin: 0 0 10px; }
.intro p { margin: 0; color: var(--mute); font-size: 17px; }
.open-now { margin: 28px 0 8px; }
.open-now-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.open-now-head h2 { font: 700 18px/1.3 var(--display); margin: 0; }
.open-now-head small { color: var(--mute); font-size: 13px; }
.ribbon { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.ribbon li { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 12px; display: grid; gap: 8px; }
.ribbon a { text-decoration: none; font-weight: 700; line-height: 1.4; }
.ribbon a:hover { color: var(--green); }

/* 신청 기간 도장 — 이 사이트의 표시 */
.stamp { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--stamp); color: var(--stamp); border-radius: 6px; padding: 2px 8px; font: 700 13px/1.5 var(--body); font-variant-numeric: tabular-nums; width: fit-content; letter-spacing: -.01em; }
.stamp b { font-weight: 800; padding-left: 8px; border-left: 1.5px solid currentColor; }
.stamp.closed { border-color: var(--line); color: var(--mute); }
.period-bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.period-bar span { display: block; height: 100%; background: var(--stamp); }

/* ── 분류 칩 ── */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 36px 0 24px; padding: 0; list-style: none; }
.chips a { display: block; text-decoration: none; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--mute); background: #f3f6f4; }
.chips a[aria-current="page"], .chips a:hover { background: var(--ink); color: #fff; }

/* ── 글 목록 ── */
.lead { display: grid; grid-template-columns: 1.35fr 1fr; gap: 36px; align-items: center; text-decoration: none; margin-bottom: 48px; }
.lead .thumb { aspect-ratio: 16 / 10; }
.lead h2 { font: 800 clamp(24px, 2.6vw, 32px)/1.3 var(--display); letter-spacing: -.03em; margin: 10px 0 12px; }
.thumb { border-radius: var(--r); overflow: hidden; background: var(--tint); aspect-ratio: 16 / 10; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
a:hover .thumb img { transform: scale(1.03); }
.cat { font-size: 13px; font-weight: 700; color: var(--green); }
.excerpt { color: var(--mute); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--mute); margin-top: 14px; font-variant-numeric: tabular-nums; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; list-style: none; padding: 0; margin: 0 0 72px; }
.card a { text-decoration: none; display: grid; gap: 10px; }
.card h3 { font: 700 19px/1.4 var(--display); letter-spacing: -.02em; margin: 4px 0 0; }
.card a:hover h3, .lead:hover h2 { color: var(--green); }
.card .excerpt { -webkit-line-clamp: 2; font-size: 15px; }

/* ── 글 화면 ── */
.post-band { background: var(--tint); padding: 52px 0 40px; }
.post-band .wrap { max-width: 860px; }
.post-band h1 { font: 800 clamp(28px, 4vw, 42px)/1.3 var(--display); letter-spacing: -.035em; margin: 8px 0 16px; }
.post-band .meta { margin-top: 0; font-size: 14px; }
.post-layout { display: grid; grid-template-columns: 220px minmax(0, 720px) 260px; gap: 44px; justify-content: center; padding: 44px 0 80px; }
.toc { position: sticky; top: 88px; align-self: start; font-size: 14px; }
.toc strong { display: block; font-size: 13px; color: var(--mute); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); display: grid; gap: 9px; }
.toc a { text-decoration: none; color: var(--mute); line-height: 1.45; display: block; }
.toc a:hover, .toc a.on { color: var(--green); font-weight: 600; }
.aside { position: sticky; top: 88px; align-self: start; display: grid; gap: 16px; }
.basis { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; font-size: 14px; display: grid; gap: 12px; }
.basis h2 { font: 700 15px/1.3 var(--display); margin: 0; }
.basis dl { margin: 0; display: grid; gap: 10px; }
.basis dt { color: var(--mute); font-size: 12px; }
.basis dd { margin: 0; font-weight: 600; line-height: 1.5; }
.basis dd a { color: var(--green); }
.ad-slot { min-height: 250px; border: 1px dashed var(--line); border-radius: var(--r); display: grid; place-items: center; color: #9aa59f; font-size: 12px; }
.ad-slot.in-article { min-height: 120px; margin: 32px 0; }

/* 본문 글자 — 프로그램이 넣은 상자 꾸밈은 글 안 style 이 이긴다 */
.entry { font-size: 17px; line-height: 1.85; }
.entry h2 { font: 800 25px/1.4 var(--display); letter-spacing: -.025em; margin: 2.2em 0 .7em; scroll-margin-top: 90px; }
.entry h3 { font: 700 20px/1.45 var(--display); margin: 1.8em 0 .5em; }
.entry p { margin: 0 0 1.2em; }
.entry img { border-radius: var(--r); margin: 1.6em 0; }
.entry figure { margin: 1.6em 0; }
.entry figcaption { font-size: 13px; color: var(--mute); margin-top: -1em; }
.entry table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 1.4em 0; display: block; overflow-x: auto; }
.entry th, .entry td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.entry th { background: #f3f6f4; font-weight: 700; }
.entry a { color: var(--green); }
.entry ul, .entry ol { padding-left: 1.3em; }

/* ── 바닥 ── */
.site-foot { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--mute); font-size: 14px; }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.site-foot p { margin: 0 0 6px; }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* ── 폭 ── */
@media (max-width: 1100px) {
  .post-layout { grid-template-columns: minmax(0, 720px) 240px; }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .lead { grid-template-columns: 1fr; gap: 16px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 32px 18px; }
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; }
  .site-foot .wrap { grid-template-columns: 1fr; }
  .site-foot nav { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .site-head .wrap { gap: 14px; }
  .nav { gap: 16px; }
  .grid { grid-template-columns: 1fr; }
  .intro { padding: 36px 0 16px; }
  .open-now-head { flex-direction: column; gap: 2px; }
  .ribbon { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .ribbon li { scroll-snap-align: start; }
  .entry { font-size: 16.5px; }
  .post-band { padding: 36px 0 28px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
