/* 지방의회 동향: 모양 파일.
   기준은 blog/design/brunch.md (색·간격·모서리·그림자 규칙). 글꼴은 사용자가 고른 프리젠테이션(Freesentation, OFL).
   고른 시안: A(흰 면 위의 큰 제목) + C(조문 한 줄, 왼쪽 여백에 근거) 를 중심으로 B(표지) 를 섞었다.
   - 첫 화면: C 의 조문 한 줄 + B 의 표지 + A 의 글 목록
   - 본문 화면: B 의 표지 띠 + A 의 700px 읽기 + C 의 왼쪽 여백 */

@font-face { font-family: "Freesentation"; font-weight: 300; font-style: normal; font-display: swap; src: url(fonts/Freesentation-Light.woff2) format("woff2"); }
@font-face { font-family: "Freesentation"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/Freesentation-Regular.woff2) format("woff2"); }
@font-face { font-family: "Freesentation"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/Freesentation-Medium.woff2) format("woff2"); }
@font-face { font-family: "Freesentation"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/Freesentation-SemiBold.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --font: "Freesentation", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --bg: #FFFFFF;
  --bg-subtle: #FBFBFB;
  --ink: #171717;
  --fg: #333333;
  --fg2: #666666;
  --fg3: #757575;
  --line: #DDDDDD;
  --soft: #EEEEEE;
  --teal: #00C6BE;
  --teal-d: #007A75;
  --teal-50: #EAFBF9;
  --warn-bg: #FFF7E6;
  --warn-fg: #8A651E;

  --margin-col: 170px;
  --reader: 700px;
  --col-gap: 40px;
  --gutter: 32px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  --shadow-book: 0 10px 20px rgba(0, 0, 0, .1);
  --duration-fast: 200ms;
  --ease-out: cubic-bezier(.2, 0, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.9;
  word-break: keep-all;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
h1, h2, h3 { font-weight: 300; color: var(--ink); text-wrap: balance; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--teal-d); outline-offset: 4px; }
.wrap { width: 100%; max-width: calc(1100px + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }

/* 두 칸: 왼쪽 좁은 칸은 근거와 출처, 오른쪽 넓은 칸은 글 */
.cols { display: grid; grid-template-columns: var(--margin-col) minmax(0, var(--reader)); column-gap: var(--col-gap); justify-content: center; }
.margin, .n {
  align-self: start;
  padding-top: 12px;
  border-top: 1px solid var(--fg3);
  font-size: 13px; line-height: 1.55; color: var(--fg3); font-weight: 400;
}
.margin span, .n span { display: block; }
.margin span + span, .n span + span { margin-top: 2px; }

/* 머리와 꼬리 */
.top .wrap { display: flex; align-items: center; gap: 28px; min-height: 80px; }
.brand { font-size: 20px; line-height: 1; font-weight: 500; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.top nav { margin-left: auto; display: flex; gap: 24px; font-size: 14px; }
.top nav a { color: var(--fg2); text-decoration: none; transition: color var(--duration-fast) var(--ease-out); }
.top nav a:hover { color: var(--ink); }
.foot { margin-top: var(--space-4xl); border-top: 1px solid var(--soft); }
.foot .wrap { padding-block: 40px 56px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; line-height: 1.7; color: var(--fg3); }
.foot b { font-weight: 500; color: var(--fg2); }

/* 작은 부품 */
.tag { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: 40px; font-size: 12px; line-height: 24px; color: var(--fg2); white-space: nowrap; }
.tag.draft { border-style: dashed; color: var(--fg3); }
.cap { font-size: 13px; line-height: 1.6; color: var(--fg3); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; color: var(--fg3); }
.btn-line { display: inline-flex; align-items: center; min-height: 42px; padding: 0 22px; border: 1px solid var(--teal); border-radius: 100px; color: var(--teal-d); font-size: 14px; line-height: 24px; text-decoration: none; transition: background var(--duration-fast) var(--ease-out); }
.btn-line:hover { background: var(--teal-50); }
.btn-line:active { transform: translateY(1px); }

/* 책 표지 (그림자는 이 부품에만 쓴다) */
.cover {
  --c1: #879C96; --c2: #637F77; --c3: #34594F;
  position: relative; overflow: hidden; container-type: inline-size;
  aspect-ratio: 320 / 450; width: 100%;
  border-radius: 4px 6px 6px 4px; box-shadow: var(--shadow-book);
  background: linear-gradient(135deg, var(--c1), var(--c2) 45%, var(--c3));
}
.cover.tone-1 { --c1: #5C7C71; --c2: #3F6458; --c3: #244037; }
.cover .layer { position: absolute; inset: 0; background: #264D42; opacity: .2; clip-path: polygon(40% 0, 100% 4%, 80% 100%, 20% 92%); }
.cover .leaf { position: absolute; inset: 0; background: linear-gradient(135deg, #FAF8F1, #E7E3D7 48%, #BEBBAF); clip-path: polygon(60% -4%, 100% 0, 100% 100%, 34% 100%); }
.cover .spine { position: absolute; left: 0; top: 0; bottom: 0; width: 4%; background: linear-gradient(90deg, #173E36, #58756D 60%, rgba(183, 196, 188, .1)); }
.cover .spine::after { content: ""; position: absolute; left: 100%; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, .25); }
.cover .sheet { position: absolute; left: 12%; top: 7%; width: 62%; padding: 6cqw 6cqw 5cqw; background: #FFFFFF; }
.cover .sheet .t { font-size: 7.4cqw; line-height: 1.5; font-weight: 400; letter-spacing: -.03em; color: var(--fg); }
.cover .sheet .by { margin-top: 4cqw; font-size: 3.6cqw; line-height: 1.4; color: var(--fg3); }
.cover.flat { border-radius: 0; box-shadow: none; }
.cover.flat .sheet { left: 13%; top: 8%; width: 58%; height: 22%; padding: 0; }

/* ---------------- 첫 화면 ---------------- */
.hero { padding-block: var(--space-3xl) var(--space-3xl); }
.quote { padding-top: 12px; font-size: clamp(25px, 4.2vw, 40px); line-height: 1.7; font-weight: 300; letter-spacing: -.03em; color: var(--ink); }
.hero .margin { margin-top: 12px; }
.featured { margin-top: var(--space-3xl); display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-xl); align-items: center; }
.featured .cover { transform: rotate(-3deg); margin: 8px 0 12px 4px; }
.featured h2 { margin-top: 12px; font-size: 28px; line-height: 1.5; letter-spacing: -.03em; }
.featured h2 a { text-decoration: none; }
.featured h2 a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.featured .sum { margin-top: 12px; font-size: 15px; line-height: 1.85; color: var(--fg2); font-weight: 300; }
.featured .btn-line { margin-top: 20px; }
.empty { padding-top: 12px; color: var(--fg2); }

.list { padding-top: var(--space-2xl); }
.list-head { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: var(--space-lg); }
.list-head h2 { font-size: 24px; font-weight: 400; letter-spacing: -.03em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { min-height: 34px; padding: 0 16px; border: 1px solid var(--line); border-radius: 100px; background: transparent; color: var(--fg2); font: inherit; font-size: 13px; cursor: pointer; transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
.filters button:hover { background: var(--bg-subtle); }
.filters button[aria-pressed="true"] { background: var(--teal-d); border-color: var(--teal-d); color: #FFFFFF; }
.item { position: relative; padding-block: 36px; border-top: 1px solid var(--soft); }
.item .margin { margin-top: 0; padding-top: 0; border-top: 0; }
.item-main { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: var(--space-xl); align-items: start; }
.item h3 { margin-top: 8px; font-size: 24px; line-height: 1.5; letter-spacing: -.035em; font-weight: 400; }
.item h3 a { text-decoration: none; }
.item h3 a::after { content: ""; position: absolute; inset: 0; }
.item:hover h3 a { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.item .sum { margin-top: 8px; font-size: 14.5px; line-height: 1.85; color: var(--fg2); font-weight: 300; }
.item .status { margin-top: 8px; }
.item .cover { margin-top: 6px; }

/* ---------------- 본문 화면 ---------------- */
.band { position: relative; overflow: hidden; padding-block: var(--space-3xl); background: linear-gradient(135deg, #879C96, #637F77 45%, #34594F); }
.band.tone-1 { background: linear-gradient(135deg, #5C7C71, #3F6458 45%, #244037); }
.band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, #FAF8F1, #E7E3D7 48%, #BEBBAF); clip-path: polygon(78% 0, 100% 0, 100% 100%, 62% 100%); opacity: .95; }
.band::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 13px; background: linear-gradient(90deg, #173E36, #58756D 60%, rgba(183, 196, 188, .1)); }
.band .wrap { position: relative; z-index: 1; }
.sheet-paper { grid-column: 2; max-width: 600px; padding: 36px 40px 32px; background: #FFFFFF; }
.sheet-paper h1 { margin-top: 20px; font-size: clamp(26px, 4.4vw, 40px); line-height: 1.5; letter-spacing: -.03em; }
.sheet-paper .cap { margin-top: 16px; }

.article { display: grid; grid-template-columns: var(--margin-col) minmax(0, var(--reader)); column-gap: var(--col-gap); justify-content: center; row-gap: 24px; padding-top: var(--space-2xl); padding-inline: var(--gutter); max-width: calc(1100px + 2 * var(--gutter)); margin: 0 auto; }
.article > * { grid-column: 2; min-width: 0; }
.article > .n { grid-column: 1; }
.post-body { display: contents; }
.post-body > * { grid-column: 2; min-width: 0; }
.post-body > .n { grid-column: 1; }
.post-body > h2, .post-body > h3 { margin-top: 24px; }
.post-body > .n:has(+ h2), .post-body > .n:has(+ h3) { margin-top: 24px; }
.post-body h2 { font-size: 26px; line-height: 1.5; font-weight: 500; letter-spacing: -.03em; }
.post-body h3 { font-size: 21px; line-height: 1.5; font-weight: 500; letter-spacing: -.02em; }
.post-body p { color: var(--fg); }
.post-body p.short { color: var(--ink); font-weight: 500; }
.post-body strong { font-weight: 600; color: var(--ink); }
.post-body a { color: var(--teal-d); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li + li { margin-top: 6px; }
.post-body hr { border: 0; border-top: 1px solid var(--soft); margin: 8px 0; width: 100%; }
.post-body code { padding: 1px 6px; background: var(--bg-subtle); border: 1px solid var(--soft); font-size: .9em; }
.post-body figure img { display: block; }
.post-body figcaption { margin-top: 8px; font-size: 13px; color: var(--fg3); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.7; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--soft); text-align: left; vertical-align: top; }
th { font-weight: 500; color: var(--ink); border-bottom-color: var(--line); }

.notice { padding-block: 20px; border-block: 1px solid var(--soft); }
.notice p { font-size: 14.5px; line-height: 1.85; color: var(--fg2); font-weight: 300; }
.todo { padding: 16px 20px; border: 1px dashed var(--warn-fg); background: var(--warn-bg); color: var(--warn-fg); font-size: 15px; line-height: 1.8; }
.todo b { display: block; font-weight: 600; margin-bottom: 4px; }

.ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl); }
.ledger .col { padding-top: 16px; border-top: 1px solid var(--fg3); }
.ledger .col.no { border-top: 1px dashed var(--warn-fg); }
.ledger h3 { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--teal-d); }
.ledger .no h3 { color: var(--warn-fg); }
.ledger h3 span { font-weight: 400; color: var(--fg3); font-size: 13px; }
.ledger ul { list-style: none; padding: 0; margin-top: 12px; }
.ledger li { font-size: 14.5px; line-height: 1.75; color: var(--fg); font-weight: 300; }
.ledger li + li { margin-top: 10px; }
.ledger li.none { color: var(--fg3); }

.back { margin-top: 16px; font-size: 14px; }
.back a { color: var(--teal-d); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl); margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--soft); }
.pager a { display: block; text-decoration: none; }
.pager small { display: block; font-size: 12px; color: var(--fg3); }
.pager span { display: block; margin-top: 4px; font-size: 16px; line-height: 1.6; color: var(--ink); }
.pager a:hover span { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.pager .next { grid-column: 2; text-align: right; }
.pager .prev { grid-column: 1; }

/* ---------------- 좁은 화면 ---------------- */
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .cols { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .article { grid-template-columns: minmax(0, 1fr); row-gap: 20px; padding-inline: var(--gutter); }
  .article > *, .post-body > * { grid-column: 1; }
  .article > .n, .post-body > .n { grid-column: 1; }
  .n, .margin { padding-top: 0; border-top: 0; }
  .post-body > .n { margin-bottom: -12px; }
  .post-body > .n:has(+ h2), .post-body > .n:has(+ h3) { margin-top: 24px; margin-bottom: -12px; }
  .sheet-paper { grid-column: 1; padding: 28px 24px 24px; }
  .hero { padding-block: var(--space-2xl); }
  .list-head { grid-column: 1; }
  .item-main { grid-template-columns: minmax(0, 1fr) 64px; gap: var(--space-lg); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .top .wrap { min-height: 64px; }
  .featured { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .featured .cover { width: 160px; }
  .featured h2 { font-size: 24px; }
  .item h3 { font-size: 21px; }
  .ledger { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .next, .pager .prev { grid-column: 1; text-align: left; }
  .post-body h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
