/* ISCC 인증 실례(가상 예시문서) 묶음의 공용 스타일 — 흰 종이 레이아웃, 가상 표시 띠, 견본 워터마크 */

:root {
  --primary: #800000;
  --secondary: #9fa0a0;
  --accent: #ffab40;
  --ink: #23201f;
  --ink-soft: #57514f;
  --bg: #efebe7;
  --line: #d9d3cd;
  --paper: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ---------- 가상 표시 띠 · 이동 막대 ---------- */
.fiction-band {
  background: var(--accent);
  color: #1b1b1b;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  padding: 7px 16px;
  letter-spacing: .01em;
}
.docnav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
}
.docnav-inner {
  max-width: 932px;
  margin: 0 auto;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15.5px;
}
.docnav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.docnav a:hover { text-decoration: underline; }
.docnav .where {
  flex: 1;
  min-width: 0;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
.docnav .off { color: var(--secondary); font-weight: 700; white-space: nowrap; }

/* ---------- 종이 ---------- */
.wrap { max-width: 932px; margin: 0 auto; padding: 28px 16px 60px; }
.sheet {
  position: relative;
  background: var(--paper);
  padding: 58px 64px 46px;
  margin: 0 0 30px;
  box-shadow: 0 1px 2px rgba(60,40,30,.08), 0 10px 30px rgba(60,40,30,.10);
  overflow: hidden;
}
.sheet.a4 { min-height: 1180px; display: flex; flex-direction: column; }
.sheet.a4 .sheet-foot { margin-top: auto; }
.sheet.a4 .cert-body { margin-bottom: 40px; }
.sheet > * { position: relative; z-index: 1; }

/* 견본 워터마크 — 관공서·인증기관 서식을 닮은 문서의 본문에 깐다 */
.sheet.sample::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='420' height='340'><text x='210' y='190' text-anchor='middle' font-family='Apple SD Gothic Neo, Noto Sans KR, sans-serif' font-size='96' font-weight='800' fill='%23800000' fill-opacity='0.085' transform='rotate(-28 210 170)'>견본</text></svg>");
  background-repeat: repeat;
  background-position: center 40px;
}

.sheet-foot {
  margin-top: 44px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--secondary);
}

/* ---------- 문서 머리 ---------- */
.co { font-size: 15.5px; font-weight: 700; color: var(--ink-soft); letter-spacing: .02em; margin: 0 0 4px; }
h1 { font-size: 30px; line-height: 1.3; color: var(--primary); margin: 0 0 22px; font-weight: 800; }
h2 { font-size: 22px; color: var(--primary); margin: 40px 0 12px; font-weight: 800; }
h3 { font-size: 18.5px; color: var(--primary); margin: 30px 0 8px; font-weight: 800; }
h1 + h2, .meta + h2 { margin-top: 26px; }
p { margin: 10px 0; }
ul, ol { margin: 8px 0 12px; padding-left: 1.35em; }
li { margin: 4px 0; }
sub, sup { font-size: .72em; line-height: 0; }
a { color: var(--primary); }
.small { font-size: 15.5px; color: var(--ink-soft); }
.center { text-align: center; }
.right { text-align: right; }

/* ---------- 표 — 세로선 없이 가로선만 ---------- */
table { width: 100%; border-collapse: collapse; margin: 16px 0 22px; font-size: 15.5px; line-height: 1.55; }
caption { caption-side: top; text-align: left; font-weight: 800; font-size: 15.5px; color: var(--ink); padding: 0 0 6px; }
th, td { border: none; border-bottom: 1px solid var(--line); padding: 8px 9px; text-align: left; vertical-align: top; }
thead th { color: var(--primary); font-weight: 800; border-bottom: 1.6px solid var(--primary); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.c, th.c { text-align: center; }
tr.total td { font-weight: 800; border-bottom: 1.6px solid var(--primary); }
tr.hl td { background: #fff7ea; }
td.nw, th.nw { white-space: nowrap; }
table.tight { font-size: 15px; }
table.tight th, table.tight td { padding: 8px 5px; }

/* 머리 정보 표(문서번호·개정 등) — 항목명 열과 값 열 */
table.meta { margin: 0 0 26px; }
table.meta th { width: 150px; color: var(--ink-soft); font-weight: 700; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.kv th { width: 230px; color: var(--ink-soft); font-weight: 700; border-bottom: 1px solid var(--line); white-space: normal; }
table.kv.wide th { width: 300px; }

/* ---------- 상자 ---------- */
.box { border-left: 4px solid var(--accent); background: #fffaf2; padding: 12px 18px; margin: 18px 0; }
.box b.t { display: block; color: var(--primary); margin-bottom: 2px; }
.rule { border: 1.4px solid var(--primary); padding: 12px 18px; margin: 18px 0; }
.formula { font-size: 18px; text-align: center; padding: 12px 10px; margin: 16px 0; background: #f8f5f2; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: 13.5px; font-weight: 800; padding: 1px 9px; border-radius: 999px; background: var(--primary); color: #fff; vertical-align: 2px; white-space: nowrap; }
.tag.acc { background: var(--accent); color: #1b1b1b; }
.tag.gray { background: #ecebea; color: var(--ink-soft); }

/* 증서형 문서 */
.cert-title { text-align: center; font-size: 38px; letter-spacing: .32em; text-indent: .32em; color: var(--ink); margin: 26px 0 8px; font-weight: 800; }
.cert-sub { text-align: center; color: var(--ink-soft); margin: 0 0 36px; font-size: 17.5px; }
.cert-body { font-size: 18.5px; }
.cert-body table { font-size: 18px; }
.cert-body table.kv th { width: 210px; }
.cert-issuer { text-align: center; margin-top: 54px; font-size: 21px; font-weight: 800; letter-spacing: .08em; }
.cert-date { text-align: center; margin-top: 44px; font-size: 18.5px; }
.nostamp { display: block; margin-top: 6px; font-size: 14.5px; font-weight: 400; color: var(--secondary); letter-spacing: 0; }

/* 서명란 */
.sign { display: flex; gap: 0; margin: 26px 0 6px; border-top: 1.6px solid var(--primary); }
.sign div { flex: 1; padding: 10px 12px 34px; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.sign div b { display: block; color: var(--primary); }

/* 그림 */
figure { margin: 22px 0; }
figure svg { display: block; width: 100%; height: auto; }
figcaption { font-weight: 800; font-size: 15.5px; text-align: center; margin-top: 8px; }

/* 체크리스트(내부심사) */
table.chk td:first-child { width: 46px; color: var(--ink-soft); }
table.chk td:last-child { white-space: nowrap; font-weight: 800; }
.ok { color: #1f7a48; }
.obs { color: #b06d00; }
.nc { color: #b3261e; }

/* ---------- 목차 ---------- */
.idx-hero { padding: 6px 4px 8px; }
.idx-hero h1 { margin-bottom: 10px; }
.idx-sec { background: var(--paper); padding: 26px 34px 18px; margin: 0 0 20px; box-shadow: 0 1px 2px rgba(60,40,30,.08), 0 6px 18px rgba(60,40,30,.07); }
.idx-sec h2 { margin: 0 0 4px; font-size: 22px; }
.idx-sec p.d { margin: 0 0 8px; color: var(--ink-soft); font-size: 16px; }
.idx-list { list-style: none; padding: 0; margin: 0; }
.idx-list li { margin: 0; border-top: 1px solid var(--line); }
.idx-list a { display: flex; gap: 14px; align-items: baseline; padding: 11px 4px; text-decoration: none; color: var(--ink); }
.idx-list a:hover b { text-decoration: underline; }
.idx-list .n { color: var(--secondary); font-weight: 800; width: 46px; flex: none; font-variant-numeric: tabular-nums; }
.idx-list b { color: var(--primary); font-weight: 800; flex: none; }
.idx-list span.s { color: var(--ink-soft); font-size: 15.5px; }

@media (max-width: 760px) {
  .sheet { padding: 34px 22px 30px; }
  .idx-list a { flex-wrap: wrap; }
  table { display: block; overflow-x: auto; }
}

@media print {
  body { background: #fff; }
  .docnav { position: static; }
  .sheet { box-shadow: none; page-break-after: always; }
}
