/* iparilabs.com - 전자공고 공통 스타일
   외부 폰트/CDN 없이 동작합니다. 수정해도 전체 페이지에 일괄 반영됩니다. */

:root {
  --bg: #ffffff;
  --fg: #17181a;
  --muted: #6a6f76;
  --line: #e4e6ea;
  --line-strong: #c9ced6;
  --accent: #1b3a6b;
  --soft: #f6f8fa;
  --maxw: 860px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
}

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

/* ── 헤더 ───────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 28px 0 24px;
}

.site-header .brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.site-header .brand strong {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.site-header .brand span {
  font-size: 0.875rem;
  color: var(--muted);
}

.site-header nav {
  margin-top: 10px;
  font-size: 0.9rem;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 16px;
}

.site-header nav a:hover { color: var(--accent); }

/* ── 본문 ───────────────────────────────── */
main { padding: 44px 0 64px; }

h1 {
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

h2 {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin: 44px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.lead {
  color: var(--muted);
  margin: 0 0 32px;
  font-size: 0.95rem;
}

.notice-box {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  font-size: 0.9rem;
  color: #3c4148;
  margin: 0 0 36px;
}

.notice-box p { margin: 0; }
.notice-box p + p { margin-top: 8px; }

/* ── 공고 목록 ──────────────────────────── */
table.list {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

table.list thead th {
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 10px 12px;
  border-top: 2px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.list tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.list td.date,
table.list td.num {
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

table.list td.title a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
}

table.list td.title a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.empty {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ── 공고 문서 ──────────────────────────── */
.document {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 48px 44px;
  margin-top: 28px;
}

.document h1 {
  text-align: center;
  font-size: 1.45rem;
  margin: 0 0 28px;
}

.document .meta {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin-bottom: 32px;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.document .body p { margin: 0 0 16px; }

.document .signature {
  margin-top: 48px;
  text-align: center;
  line-height: 2.1;
}

.document .signature .date { color: var(--muted); font-size: 0.95rem; }
.document .signature .company { font-size: 1.05rem; font-weight: 600; }

table.figures {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 20px 0;
  font-variant-numeric: tabular-nums;
}

table.figures caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: 8px;
}

table.figures th,
table.figures td {
  border: 1px solid var(--line);
  padding: 9px 12px;
}

table.figures thead th {
  background: var(--soft);
  font-weight: 600;
}

table.figures td.amount { text-align: right; }
table.figures tr.total { font-weight: 600; background: var(--soft); }

.back-link {
  display: inline-block;
  margin-top: 32px;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover { color: var(--accent); }

/* ── 회사 정보 / 푸터 ───────────────────── */
dl.company {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0;
  font-size: 0.92rem;
  margin: 0;
}

dl.company dt {
  color: var(--muted);
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

dl.company dd {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 48px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── 반응형 ─────────────────────────────── */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .document { padding: 28px 20px; }
  dl.company { grid-template-columns: 1fr; }
  dl.company dt { padding-bottom: 0; border-bottom: none; }
  table.list thead { display: none; }
  table.list tbody td { display: block; border-bottom: none; padding: 2px 0; }
  table.list tbody tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  table.list td.num { display: none; }
}

/* ── 인쇄 (공고 게시 증빙용) ────────────── */
@media print {
  .site-header nav, .back-link, .site-footer { display: none; }
  body { font-size: 11pt; }
  .document { border: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
}
