/* ==========================================================================
   base.css — 뉴스와 관리자가 함께 쓰는 것
   --------------------------------------------------------------------------
   디자인 토큰, 리셋, 그리고 양쪽에서 실제로 쓰이는 컴포넌트 셋만 둔다.

   토큰을 admin.css 에 복사해 두지 않는 이유:
     --accent 를 바꾼 날 관리자만 옛 빨강으로 남는다. 아무도 뉴스 사이트와
     관리자를 나란히 놓고 보지 않으니 한 달쯤 모른 채로 간다.

   여기 있는 것은 전부 style.css 에서 그대로 옮겨온 것이다. 규칙을 새로
   쓰지 않았다 — 옮기는 김에 고치면 무엇 때문에 깨졌는지 알 수 없게 된다.

   불러오는 순서:
     뉴스   base.css → style.css
     관리자 base.css → admin.css
   ========================================================================== */

/* ---------- 1. 디자인 토큰 ---------- */
:root {
  /* 지면 */
  --canvas:      #e8e7e3;
  --paper:       #ffffff;

  /* 잉크 */
  --ink:         #15181d;
  --ink-2:       #23272e;
  --ink-3:       #2b2f36;
  --ink-4:       #4b5058;
  --muted:       #6b7078;
  --muted-2:     #8b8f96;
  --muted-3:     #9a9a95;
  --faint:       #a8a8a2;

  /* 강조 */
  --accent:      #C1272D;
  --blue:        #1a5fb4;
  --yt:          #FF0000;

  /* 괘선 */
  --line:        #e3e3e0;
  --line-soft:   #eeede9;
  --line-faint:  #dcdbd6;

  /* 면 */
  --fill:        #f1f0ec;
  --fill-2:      #f6f5f2;
  --fill-3:      #fafaf8;
  --fill-4:      #e9e8e3;

  /* 다크 */
  --dark:        #0f1216;
  --dark-3:      #191d23;
  --dark-4:      #1b2230;
  --dark-line:   #2a2f37;
  --dark-line-2: #3a4048;
  --dark-muted:  #5f656d;
  --dark-text:   #c9ccd1;
  --dark-text-2: #b6bac0;
  --dark-text-3: #f2f3f5;

  /* 타이포 */
  --serif: "Nanum Myeongjo", ui-serif, Georgia, serif;
  --sans:  "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;

  /* 폭 */
  --wrap:      1240px;
  --wrap-wide: 1440px;
}

/* ---------- 2. 리셋 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* 한글은 어절 단위로 끊어야 읽힌다.
     keep-all 이 없으면 "대정부질문 15일부 / 터" 처럼 어절 중간에서 잘린다.
     overflow-wrap 은 어절 하나가 칸보다 넓을 때의 안전장치. */
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4, p, figure { margin: 0; }

img { max-width: 100%; display: block; }

button, input { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. 이미지 플레이스홀더 ----------
   실제 사진으로 교체할 때는 .ph 안에 <img> 를 넣으면
   점선 테두리와 캡션이 자동으로 사라집니다. */
.ph {
  position: relative;
  background: var(--fill);
  overflow: hidden;
  color: var(--muted-3);
}

.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px dashed currentColor;
  opacity: .45;
  pointer-events: none;
}

.ph::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: .02em;
  text-align: center;
  padding: 8px;
  pointer-events: none;
}

.ph > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.ph:has(> img)::before,
.ph:has(> img)::after { display: none; }

.ph--circle { border-radius: 50%; }

/* ---------- 5. 버튼 ---------- */
.btn-dark {
  background: var(--ink);
  color: #fff;
  border: 0;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.btn-dark:hover { background: #000; color: #fff; }

.btn-dark--block {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
}

/* ---------- 6. 페이지네이션 ---------- */
.pager {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
}
.pager a {
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-4);
}
.pager a:hover { border-color: var(--ink); color: var(--ink); }
.pager [aria-current="page"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.pager__next { width: auto !important; padding: 0 12px; font-size: 13px; }
