/* ============================================================
   K-HeriT 디지털 큐레이션 — 사이트 스타일
   색상은 경북대학교 영남문화연구원 홈페이지(ynculture.knu.ac.kr) 테마를 따른다.
     차콜 #373332 · 푸터 #4a4545 · 모래 #d1c6a9 · 금 #ac8f59
     적갈 #7c3126 · 올리브 #556e31 · 미색 #f6f3ee
   ============================================================ */
:root {
  --ink: #2b2726;
  --charcoal: #373332;
  --charcoal-2: #4a4545;
  --sand: #d1c6a9;
  --sand-soft: #e9e3d3;
  --cream: #f6f3ee;
  --gold: #ac8f59;
  --gold-dark: #8a6f3f;
  --red: #7c3126;
  --red-dark: #5f251c;
  --olive: #556e31;
  --brown: #66463f;
  --text: #373332;
  --muted: #7a716a;
  --line: #e4ddcc;
  --line-strong: #cfc5ad;
  --white: #fff;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(55, 51, 50, 0.06), 0 4px 14px rgba(55, 51, 50, 0.06);
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', serif;
  --sans: 'Noto Sans KR', 'Nanum Gothic', 'Apple SD Gothic Neo', sans-serif;
  --container: 1200px;
}

/* ---------- 기본 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  word-break: keep-all;
  overflow-wrap: anywhere;
  /* 콘텐츠가 적어도 바닥글이 화면 하단에 붙도록 */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body > main {
  flex: 1 0 auto;
}

body > .site-header,
body > .site-footer {
  flex-shrink: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--red);
}

img {
  max-width: 100%;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.35;
  color: var(--ink);
}

p {
  margin: 0 0 0.8em;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

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

.inline-form {
  display: inline;
  margin: 0;
}

.muted,
.result-meta {
  color: var(--muted);
  font-size: 14px;
}

/* ============================================================
   머리글
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 1px 0 var(--line);
}

.util-bar {
  background: var(--charcoal);
  color: #cfc9c2;
  font-size: 12.5px;
}

.util-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 34px;
  gap: 12px;
}

.util-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.util-link {
  color: #cfc9c2;
}

.util-link::before {
  content: "·";
  color: var(--gold);
  margin-right: 5px;
}

.util-link:hover {
  color: var(--white);
}

.util-link.as-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.util-name strong {
  color: var(--white);
  font-weight: 600;
}

.util-name em {
  font-style: normal;
  color: var(--charcoal);
  background: var(--gold);
  padding: 1px 6px;
  border-radius: 2px;
  margin-left: 6px;
  font-size: 11px;
}

.main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.brand-logo {
  height: 46px;
  width: auto;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 34px;
  background: var(--line-strong);
}

.brand-text {
  display: flex;
  align-items: center;
}

.brand-mark {
  display: block;
  height: 34px;
  width: auto;
}

.brand:hover .brand-mark {
  filter: brightness(0.8);
}

/* 주 메뉴 */
.gnb > ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gnb > ul > li {
  position: relative;
}

.gnb > ul > li > a {
  display: block;
  padding: 30px 22px;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
  position: relative;
}

.gnb > ul > li > a::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.gnb > ul > li:hover > a::after,
.gnb > ul > li.active > a::after {
  transform: scaleX(1);
}

.gnb > ul > li.active > a {
  color: var(--red);
}

.gnb-admin > a {
  color: var(--olive) !important;
}

.gnb .sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  background: var(--white);
  border-top: 2px solid var(--gold);
  box-shadow: var(--shadow);
}

.gnb .has-sub:hover .sub,
.gnb .has-sub:focus-within .sub {
  display: block;
}

.gnb .sub a {
  display: block;
  padding: 8px 20px;
  font-size: 14px;
  white-space: nowrap;
}

.gnb .sub a:hover {
  background: var(--cream);
}

.gnb .sub .sub-sep {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 6px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 10px 8px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--charcoal);
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   페이지 머리
   ============================================================ */
.page-head {
  background:
    linear-gradient(90deg, rgba(209, 198, 169, 0.96), rgba(233, 227, 211, 0.92)),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(172, 143, 89, 0.12) 22px 23px);
  border-bottom: 1px solid var(--line-strong);
  padding: 38px 0 34px;
}

.page-head.is-admin {
  background: var(--charcoal-2);
  border-bottom: 3px solid var(--olive);
  padding: 26px 0 24px;
}

.page-head.is-admin .page-title,
.page-head.is-admin .crumb,
.page-head.is-admin .crumb a {
  color: var(--white);
}

.page-head.is-admin .crumb span:last-child {
  color: var(--sand);
}

.crumb {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--brown);
}

.crumb span[aria-hidden] {
  margin: 0 8px;
  color: var(--gold-dark);
}

.page-title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
}

.page-body {
  padding-top: 36px;
  padding-bottom: 80px;
}

/* 본문 안 소제목 */
.heading {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--gold);
  line-height: 1.3;
}

.heading-sm {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar .heading {
  margin: 0;
}

/* ============================================================
   알림
   ============================================================ */
.flash-area {
  margin-top: 20px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 14px;
  border-left: 4px solid;
}

.alert-success {
  background: #eef2e6;
  color: #3d5122;
  border-color: var(--olive);
}

.alert-error {
  background: #f6ebe8;
  color: var(--red-dark);
  border-color: var(--red);
}

.alert ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

/* ============================================================
   버튼
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--gold);
  color: var(--ink);
  background: var(--cream);
}

.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
}

.btn-dark {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--ink);
  color: var(--white);
}

.btn-ok {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--white);
}

.btn-ok:hover {
  background: #44591f;
  color: var(--white);
}

.btn-accent {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

.btn-accent:hover {
  background: var(--gold-dark);
  color: var(--white);
}

.btn-danger {
  color: var(--red);
  border-color: #d9b5ad;
}

.btn-danger:hover {
  background: #f6ebe8;
  color: var(--red-dark);
  border-color: var(--red);
}

.btn-small {
  padding: 6px 11px;
  font-size: 12.5px;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-row.end {
  justify-content: flex-end;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ============================================================
   입력
   ============================================================ */
input[type=text], input[type=password], input[type=email], input[type=date], input[type=number],
input[type=search], input[type=file], select, textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  max-width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type=file] {
  padding: 7px;
  background: var(--cream);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(172, 143, 89, 0.2);
}

input.wide, textarea {
  width: 100%;
}

textarea {
  line-height: 1.7;
  resize: vertical;
}

textarea.tall {
  min-height: 340px;
}

input[readonly] {
  background: var(--cream);
  color: var(--muted);
}

input[type=checkbox], input[type=radio] {
  accent-color: var(--red);
  width: 16px;
  height: 16px;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

/* 라벨-값 2열 입력 표 */
.form-grid {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  border-top: 2px solid var(--charcoal);
  background: var(--white);
}

.form-grid > label,
.form-grid > .label {
  background: var(--cream);
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.form-grid > .field {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.hint {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 5px;
  font-weight: normal;
}

.req {
  color: var(--red);
}

.tag-internal {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--brown);
  background: var(--sand-soft);
  padding: 0 6px;
  border-radius: 2px;
  margin-left: 4px;
  vertical-align: 1px;
}

.check-group {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 4px;
}

.check-group label,
label.check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  font-weight: 400;
}

.field-error {
  color: var(--red);
  font-size: 12.5px;
  margin-top: 4px;
}

/* 세로 쌓기 폼 (로그인·계정) */
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stack-form label {
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 8px;
}

.stack-form input {
  width: 100%;
  padding: 12px;
}

.stack-form .btn {
  margin-top: 14px;
  padding: 13px;
  font-size: 15px;
}

/* ============================================================
   검색 패널
   ============================================================ */
.search-panel {
  background: var(--cream);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: 20px;
  margin-bottom: 24px;
}

.search-main {
  display: flex;
  gap: 8px;
}

.search-main input[type=text] {
  flex: 1;
  font-size: 16px;
  padding: 12px 14px;
}

.search-main .btn {
  padding: 0 26px;
}

.search-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.search-filters select,
.search-filters input {
  width: 100%;
}

.search-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 13px;
}

.search-foot {
  gap: 12px;
}

.search-foot a {
  color: var(--muted);
  text-decoration: underline;
  white-space: nowrap;
}

/* 단순 한 줄 검색 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 12px;
  margin-bottom: 18px;
}

.filter-bar input[type=text] {
  flex: 1 1 220px;
}

.result-count {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 10px;
}

.result-count strong {
  color: var(--red);
}

/* ============================================================
   표
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--charcoal);
  font-size: 14.5px;
}

table.data th {
  background: var(--cream);
  color: var(--ink);
  font-weight: 600;
  font-size: 13.5px;
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

table.data td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.data tbody tr[data-href] {
  cursor: pointer;
}

table.data tbody tr[data-href]:hover td {
  background: #fbf9f5;
}

table.data tbody tr[data-href]:hover a {
  color: var(--red);
}

table.data td a {
  font-weight: 500;
}

table.data .num {
  text-align: center;
  white-space: nowrap;
}

table.data .nowrap {
  white-space: nowrap;
}

table.data .sub {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
}

table.data .empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 10px;
}

.id-cell {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--brown);
}

/* ============================================================
   배지 · 칩
   ============================================================ */
.chip {
  display: inline-block;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--sand-soft);
  color: var(--brown);
  margin: 0 4px 4px 0;
  line-height: 1.6;
}

.chip-outline {
  background: transparent;
  border: 1px solid var(--line-strong);
}

.status-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 2px;
  white-space: nowrap;
}

.status-draft { background: #eeebe6; color: #5d5650; }
.status-requested { background: #f4ead3; color: #7a5a1c; }
.status-revision { background: #f6e3de; color: var(--red); }
.status-approved { background: #e5ecda; color: #3d5122; }

.pin-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 2px;
  background: var(--red);
  color: var(--white);
}

.status-tabs {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 18px;
}

.status-tabs a {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.status-tabs a b {
  font-weight: 600;
  margin-left: 4px;
  color: var(--ink);
}

.status-tabs a.active {
  color: var(--red);
  border-bottom-color: var(--red);
  font-weight: 600;
}

/* ============================================================
   패널 · 2단
   ============================================================ */
.panel {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 20px;
  margin-bottom: 16px;
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.panel-title small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.panel-muted {
  background: var(--cream);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.side-sticky {
  position: sticky;
  top: 140px;
}

/* ============================================================
   상세 정의 목록
   ============================================================ */
dl.detail {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  margin: 0;
  border-top: 2px solid var(--charcoal);
}

dl.detail dt,
dl.detail dd {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  margin: 0;
}

dl.detail dt {
  background: var(--cream);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

.prose {
  line-height: 1.9;
  white-space: pre-wrap;
}

.rich {
  line-height: 1.9;
}

.rich h3,
.rich h4 {
  margin: 1.4em 0 0.5em;
}

.rich img {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   파일 목록
   ============================================================ */
ul.files {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.files li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
  word-break: break-all;
}

ul.files li:last-child {
  border-bottom: 0;
}

.file-name {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.file-name::before {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 17px;
  margin-top: 2px;
  background: var(--sand);
  clip-path: polygon(0 0, 70% 0, 100% 25%, 100% 100%, 0 100%);
}

.file-size {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.dropzone {
  display: block;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
  background: var(--cream);
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--gold);
  background: var(--sand-soft);
}

/* ============================================================
   이력
   ============================================================ */
ul.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
}

ul.timeline li {
  position: relative;
  padding: 0 0 12px 18px;
  border-left: 1px solid var(--line-strong);
  margin-left: 4px;
}

ul.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
}

ul.timeline li:last-child {
  padding-bottom: 0;
}

ul.timeline time {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

pre.json {
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 12px;
  margin: 0;
  max-width: 380px;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  color: var(--brown);
}

/* ============================================================
   페이지 이동
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 32px;
}

.page-num,
.page-arrow {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
}

.page-num:hover,
.page-arrow:hover {
  border-color: var(--gold);
  color: var(--red);
}

.page-num.is-current {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--white);
  font-weight: 600;
}

/* ============================================================
   홈
   ============================================================ */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 400px at 85% 120%, rgba(172, 143, 89, 0.35), transparent 60%),
    linear-gradient(120deg, var(--charcoal) 0%, #4a3d38 60%, var(--brown) 100%);
  color: var(--white);
  overflow: hidden;
}

.hero::after {
  /* 기와 골 같은 가로 결 */
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 26px, rgba(255, 255, 255, 0.035) 26px 27px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 84px 24px 92px;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--gold);
  margin: 0 0 14px;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin: 0 0 18px;
}

.hero-title em {
  font-style: normal;
  color: var(--sand);
}

.hero-lead {
  max-width: 640px;
  font-size: 16.5px;
  line-height: 1.85;
  color: #e3ddd4;
  margin: 0 0 30px;
}

.hero-search {
  display: flex;
  max-width: 560px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero-search input {
  flex: 1;
  border: 0;
  padding: 16px 18px;
  font-size: 16px;
  border-radius: 0;
}

.hero-search input:focus {
  box-shadow: none;
}

.hero-search button {
  border: 0;
  background: var(--red);
  color: var(--white);
  padding: 0 26px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.hero-search button:hover {
  background: var(--red-dark);
}

.hero-note {
  margin-top: 10px;
  font-size: 13px;
  color: #bdb5ab;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: -1px;
  background: var(--sand);
}

.quick-links a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 26px 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--ink);
  transition: background 0.15s;
}

.quick-links a:last-child {
  border-right: 0;
}

.quick-links a:hover {
  background: var(--sand-soft);
  color: var(--ink);
}

.quick-links strong {
  font-family: var(--serif);
  font-size: 18px;
}

.quick-links span {
  font-size: 13px;
  color: var(--brown);
}

.quick-links strong::after {
  content: " →";
  color: var(--red);
  font-family: var(--sans);
}

.home-section {
  padding: 64px 0;
}

.home-section.alt {
  background: var(--cream);
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 56px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 18px;
}

.section-head .heading {
  margin: 0;
}

.more-link {
  font-size: 13px;
  color: var(--muted);
}

.more-link::after {
  content: " +";
  color: var(--red);
}

ul.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 2px solid var(--charcoal);
}

ul.news-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}

ul.news-list a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

ul.news-list time {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.archive-intro {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: 22px;
}

.feature h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.feature p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.feature:nth-child(2) {
  border-top-color: var(--red);
}

.feature:nth-child(3) {
  border-top-color: var(--olive);
}

/* ============================================================
   사업 소개
   ============================================================ */
.anchor-nav {
  display: flex;
  gap: 0;
  border: 1px solid var(--line-strong);
  margin-bottom: 40px;
  background: var(--white);
}

.anchor-nav a {
  flex: 1;
  text-align: center;
  padding: 14px 10px;
  font-weight: 500;
  border-right: 1px solid var(--line-strong);
}

.anchor-nav a:last-child {
  border-right: 0;
}

.anchor-nav a:hover {
  background: var(--cream);
}

.intro-block {
  padding-bottom: 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 140px;
}

.intro-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.intro-block figure {
  margin: 0 0 24px;
}

.intro-block figure img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

/* ============================================================
   구성원
   ============================================================ */
.member-group + .member-group {
  margin-top: 52px;
}

.member-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.member-card {
  display: flex;
  gap: 20px;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 20px;
}

.member-photo {
  width: 104px;
  height: 132px;
  object-fit: cover;
  background: var(--cream);
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.member-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

.member-position {
  font-size: 13px;
  color: var(--red);
  margin-left: 6px;
  font-family: var(--sans);
  font-weight: 500;
}

.member-meta {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  font-size: 13.5px;
}

.member-meta li {
  display: flex;
  gap: 8px;
  padding: 2px 0;
}

.member-meta b {
  flex-shrink: 0;
  width: 56px;
  color: var(--muted);
  font-weight: 500;
}

.member-bio {
  margin: 10px 0 0;
  padding: 10px 0 0 16px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* ============================================================
   소식
   ============================================================ */
.article-head {
  border-top: 2px solid var(--charcoal);
  border-bottom: 1px solid var(--line);
  padding: 22px 4px 18px;
}

.article-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}

.article-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

.article-body {
  padding: 32px 4px 40px;
  min-height: 200px;
  border-bottom: 1px solid var(--line);
}

.article-images img {
  display: block;
  max-width: 100%;
  margin: 0 auto 20px;
}

.article-files {
  background: var(--cream);
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.article-files h3 {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}

/* ============================================================
   아카이브 상세
   ============================================================ */
.record-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.record-id {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--gold-dark);
  letter-spacing: 0.05em;
}

.record-title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  margin: 4px 0 10px;
}

.record-tags .chip {
  font-size: 12.5px;
}

.record-desc {
  font-size: 15.5px;
  line-height: 2;
  white-space: pre-wrap;
  padding: 4px 0 8px;
}

.meta-list {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 8px 10px;
  margin: 0;
  font-size: 14px;
}

.meta-list dt {
  color: var(--muted);
}

.meta-list dd {
  margin: 0;
  color: var(--ink);
}

/* 아카이브 목록 카드 */
.record-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--charcoal);
}

.record-item {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 18px 6px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.record-item:hover {
  background: #fbf9f5;
}

.record-item:hover .record-item-title {
  color: var(--red);
}

.record-item-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.record-item-excerpt {
  font-size: 13.5px;
  color: var(--muted);
  margin: 4px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.record-item-designation {
  text-align: right;
  font-size: 13px;
  white-space: nowrap;
}

.record-item-designation b {
  display: block;
  color: var(--red);
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 64px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

/* ============================================================
   로그인·단순 카드
   ============================================================ */
.auth-card {
  max-width: 440px;
  margin: 24px auto 0;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  padding: 34px 36px 30px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.auth-card .auth-logo {
  display: block;
  height: 34px;
  margin: 20px auto 0;
}

.auth-card .auth-brand {
  margin-bottom: 12px;
}

.auth-card .auth-brand img {
  display: block;
  height: 34px;
  width: auto;
  margin: 0 auto;
}

.auth-card h2 {
  font-family: var(--serif);
  text-align: center;
  font-size: 22px;
  margin-bottom: 6px;
}

.auth-card .auth-lead {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 14px;
}

.auth-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.error-card {
  text-align: center;
  padding: 72px 16px 32px;
}

.error-card .code {
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 700;
  color: var(--sand);
  line-height: 1;
}

.error-card h2 {
  margin: 12px 0 8px;
  font-family: var(--serif);
}

/* ============================================================
   관리 — 요약 카드
   ============================================================ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.stat {
  display: block;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  padding: 14px 16px;
  background: var(--white);
}

.stat:hover {
  background: var(--cream);
  color: inherit;
}

.stat.active {
  background: var(--cream);
  border-color: var(--gold);
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.stat-draft { border-left-color: #a39b93; }
.stat-requested { border-left-color: var(--gold); }
.stat-revision { border-left-color: var(--red); }
.stat-approved { border-left-color: var(--olive); }

.guide-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
}

/* ============================================================
   바닥글
   ============================================================ */
.site-footer {
  background: var(--charcoal-2);
  color: #b9b2ab;
  font-size: 13px;
  border-top: 4px solid var(--sand);
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 32px;
}

.footer-logo {
  height: 42px;
  flex-shrink: 0;
}

.footer-text {
  flex: 1;
}

.footer-text p {
  margin: 0 0 2px;
}

.footer-project {
  color: #e3ddd4;
}

.footer-copy {
  margin-top: 8px !important;
  font-size: 12px;
  color: #8f8882;
}

.footer-links {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: #e3ddd4;
}

.footer-links a:hover {
  color: var(--sand);
}

/* ============================================================
   반응형
   ============================================================ */
@media (max-width: 1080px) {
  .gnb > ul > li > a {
    padding: 30px 14px;
    font-size: 15.5px;
  }

  .gnb > ul > li > a::after {
    left: 14px;
    right: 14px;
  }

  .two-col {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .main-inner {
    min-height: 68px;
  }

  .brand-logo {
    height: 36px;
  }

  .gnb {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }

  .gnb.open {
    display: block;
  }

  .gnb > ul {
    flex-direction: column;
    padding: 8px 0;
  }

  .gnb > ul > li > a {
    padding: 13px 24px;
  }

  .gnb > ul > li > a::after {
    display: none;
  }

  .gnb .sub {
    display: block;
    position: static;
    transform: none;
    box-shadow: none;
    border-top: 0;
    padding: 0 0 8px;
    background: var(--cream);
  }

  .gnb .sub a {
    padding: 9px 40px;
  }

  .two-col,
  .home-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-sticky {
    position: static;
  }

  .quick-links,
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-links a:nth-child(2) {
    border-right: 0;
  }

  .archive-intro {
    grid-template-columns: 1fr;
  }

  .search-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14.5px;
  }

  .container {
    padding: 0 16px;
  }

  .util-inner > .util-link:first-child {
    display: none;
  }

  .hero-eyebrow {
    letter-spacing: 0.12em;
    font-size: 11.5px;
  }

  .util-inner {
    justify-content: flex-end;
  }

  .brand {
    gap: 10px;
  }

  .brand-logo {
    height: 30px;
  }

  .brand-divider {
    height: 26px;
  }

  .brand-mark {
    height: 24px;
  }

  .page-head {
    padding: 24px 0 22px;
  }

  .page-title {
    font-size: 23px;
  }

  .page-body {
    padding-top: 24px;
    padding-bottom: 56px;
  }

  .hero-inner {
    padding: 52px 16px 60px;
  }

  .hero-title {
    font-size: 29px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-search button {
    padding: 0 18px;
  }

  .quick-links a {
    padding: 18px 16px;
  }

  .home-section {
    padding: 44px 0;
  }

  .form-grid,
  dl.detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid > label,
  .form-grid > .label,
  dl.detail dt {
    border-bottom: 0;
    padding: 10px 14px 4px;
  }

  .search-main .btn {
    padding: 0 16px;
  }

  .search-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  table.data .hide-sm {
    display: none;
  }

  .record-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .record-item-designation {
    text-align: left;
  }

  .record-item-designation b {
    display: inline;
    margin-right: 6px;
  }

  .record-title {
    font-size: 24px;
  }

  .member-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-photo {
    width: 84px;
    height: 108px;
  }

  .anchor-nav {
    flex-direction: column;
  }

  .anchor-nav a {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .auth-card {
    padding: 26px 20px;
  }
}
