/* 고흥닷컴 — 파스텔 색지를 겹쳐 놓은 종이 공작 */

:root {
  --table: #F4F1EA;   /* 책상 위 종이색 */
  --sheet: #FFFDF8;   /* 맨 위에 놓인 흰 종이 */
  --text: #33404B;
  --muted: #6B7783;
  --link: #3A6B8C;
  --line: #E8E2D6;
  --shadow: 0 1px 1px rgba(80, 66, 40, .06), 0 3px 8px rgba(80, 66, 40, .08), 0 12px 24px rgba(80, 66, 40, .06);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --col: 44rem;
}

/* 시리즈 색지: --s 앞장, --s2 뒷장 */
.s-ordinance { --s: #C9DFF0; --s2: #E3EFF8; }
.s-stats     { --s: #F7E7B0; --s2: #FBF2D3; }
.s-briefing  { --s: #F5CFD3; --s2: #FAE5E7; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--table); color: var(--text);
  font-family: var(--font); line-height: 1.75;
  word-break: keep-all; overflow-wrap: break-word;
}
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 4px; }

.col { max-width: var(--col); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 10;
  background: var(--sheet); color: var(--text); padding: 8px 14px; border-radius: 6px; box-shadow: var(--shadow);
}
.skip:focus { top: 12px; }

/* 머리말 */
.top { padding: 28px 0 8px; }
.top .col { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; }
.brand { font-size: 1.35rem; font-weight: 800; color: var(--text); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.nav-link {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 4px 0; border-bottom: 4px solid transparent;
}
.nav-link:hover, .nav-link.is-active { color: var(--text); border-bottom-color: var(--s); }

/* 소개 */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.intro { padding: 30px 0 22px; }
.intro p { margin: 0; color: var(--muted); font-size: 1.02rem; }

/* 겹쳐진 종이: 앞장 위에 뒷장 두 장이 깔려 있는 모양 */
.stack { display: grid; gap: 22px; isolation: isolate; }
.paper { position: relative; background: var(--sheet); border-radius: 6px; box-shadow: var(--shadow); }
.layered::before, .layered::after {
  content: ""; position: absolute; inset: 0; border-radius: 6px; z-index: -1; box-shadow: var(--shadow);
}
/* 짧은 종이(시리즈 안내): 색지 앞장, 뒷장은 살짝 기울임 */
.tint { background: var(--s); }
.tint::before { background: var(--s2); transform: rotate(-1.4deg); }
.tint::after  { background: var(--sheet); transform: rotate(1.1deg); }
/* 긴 종이(글 본문): 흰 앞장, 색지 뒷장은 기울이지 않고 비켜 놓음 */
.backed::before { background: var(--s2); transform: translate(10px, 10px); }
.backed::after  { background: var(--s);  transform: translate(5px, 5px); }

/* 시리즈 안내 */
.series-link { display: block; padding: 22px 24px; color: var(--text); text-decoration: none; }
.series-link h2 { margin: 0 0 4px; font-size: 1.35rem; line-height: 1.4; font-weight: 800; }
.series-link p { margin: 0; font-size: .97rem; }
.series-link .count { display: block; margin-top: 10px; font-size: .88rem; font-weight: 700; }
.series-link:hover h2 { text-decoration: underline; text-underline-offset: 5px; }
.series-link:focus-visible { outline-offset: 6px; }

/* 글 목록 */
.section { padding-top: 48px; }
.section h2 { margin: 0 0 14px; font-size: 1.2rem; font-weight: 800; }
.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.posts li {
  display: grid; gap: 1px; padding: 12px 16px;
  background: var(--sheet); border-left: 8px solid var(--s); border-radius: 4px; box-shadow: var(--shadow);
}
.posts a { color: var(--text); font-weight: 700; text-decoration: none; }
.posts a:hover { text-decoration: underline; text-underline-offset: 4px; }
.posts .meta { font-size: .85rem; color: var(--muted); }
.posts.big { gap: 16px; }
.posts.big li { padding: 18px 22px; gap: 4px; }
.posts.big a { font-size: 1.2rem; line-height: 1.5; }
.posts.big .meta { order: -1; }
.posts .excerpt { margin: 2px 0 0; font-size: .95rem; line-height: 1.7; color: var(--text); }
.more { margin: 22px 0 0; font-weight: 700; }
.empty { color: var(--muted); margin: 0; }

/* 시리즈 페이지, 글 머리 */
.head { padding: 40px 0 24px; }
.head h1, .head h2 { margin: 0; font-size: 2rem; line-height: 1.35; font-weight: 800; }
.head h2 a { color: inherit; text-decoration: none; }
.head h2 a:hover { text-decoration: underline; text-underline-offset: 5px; }
.head .lede { margin: 8px 0 0; color: var(--muted); }
.chip {
  display: inline-block; margin-bottom: 14px; padding: 3px 14px; border-radius: 999px;
  background: var(--s); color: var(--text); font-weight: 700; font-size: .85rem; text-decoration: none;
}
.chip:hover { text-decoration: underline; }
.head time { display: block; margin-top: 10px; color: var(--muted); font-size: .92rem; }

/* 글 본문 */
.body { padding: 28px 24px 12px; font-size: 1.0625rem; line-height: 1.9; }
.body > :first-child { margin-top: 0; }
.body p { margin: 0 0 1.3em; }
.body h2 {
  width: fit-content; max-width: 100%; margin: 2.2em 0 .8em; font-size: 1.35rem; line-height: 1.5; font-weight: 800;
  background: linear-gradient(transparent 58%, var(--s) 58%);
}
.body h3 { margin: 1.8em 0 .5em; font-size: 1.15rem; font-weight: 800; }
.body ul, .body ol { padding-left: 1.4em; margin: 0 0 1.3em; }
.body li { margin-bottom: .4em; }
.body blockquote {
  margin: 1.5em 0; padding: 10px 18px; background: var(--table);
  border-left: 5px solid var(--s); border-radius: 0 6px 6px 0;
}
.body blockquote p:last-child { margin-bottom: 0; }
.body table {
  display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse;
  margin: 1.5em 0; font-size: .95rem; line-height: 1.6;
}
.body th { background: var(--s); text-align: left; padding: 8px 14px; white-space: nowrap; }
.body td { padding: 8px 14px; border-bottom: 1px solid var(--line); }
.body code { background: var(--table); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.body img { max-width: 100%; height: auto; border-radius: 6px; }
.body hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }

/* 맺음말 */
.foot { padding: 56px 0 40px; color: var(--muted); font-size: .9rem; }
.foot .col { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot a { color: var(--muted); }

/* 글 안의 막대 그래프 */
.body .bars { margin: 1.2em 0 1.6em; }
.body .bar-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: .9rem; }
.body .bar-label { flex: 0 0 3.2em; color: var(--text); }
.body .bar-track { flex: 1; min-width: 0; }
.body .bar { height: 18px; border-radius: 3px; background: var(--s, #C9DFF0); }
.body .bar-val { flex: 0 0 4.6em; text-align: right; font-variant-numeric: tabular-nums; }
.body .bar-caption { margin: 1.2em 0 .2em; font-weight: 600; }
