/* 사기꾼박멸연구소 — '연구소 표본 기록부'. 경고 테이프 노랑(--hazard)은 머리띠 한 곳에만 쓴다. */
:root {
  --bg: #F1F3F2;
  --paper: #FFFFFF;
  --ink: #101418;
  --muted: #5B6670;
  --line: #CDD3D6;
  --grid: rgba(16, 20, 24, .055);
  --hazard: #F5B800;
  --specimen: #0E5C4A;
  --specimen-soft: #E3EFEB;
  --display: 'Black Han Sans', 'Pretendard Variable', Pretendard, sans-serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --mono: 'IBM Plex Mono', 'Pretendard Variable', Pretendard, ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --wide: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16.5px/1.75 var(--sans); word-break: keep-all; overflow-wrap: anywhere; overflow-x: hidden; }
a { color: var(--specimen); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 30; }
.skip:focus { left: 8px; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -.01em; }
h2 { font-size: 1.28rem; font-weight: 800; margin: 2.4em 0 .7em; }

/* 머리 — 경고 테이프 + 이름 */
.top { background: var(--ink); color: #fff; }
.tape { height: 8px; background: repeating-linear-gradient(-45deg, var(--hazard) 0 14px, var(--ink) 14px 28px); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 400 1.32rem/1 var(--display); letter-spacing: .01em; }
.brand .mark { width: 26px; height: 26px; color: #fff; flex: none; }
.menu { display: flex; gap: 4px; flex-wrap: wrap; }
.menu a { color: #D7DDE0; text-decoration: none; font-weight: 600; font-size: .95rem; padding: 6px 10px; border-radius: 4px; }
.menu a:hover, .menu a[aria-current] { color: #fff; background: rgba(255, 255, 255, .1); }

/* 첫 화면 — 모눈종이 위 검색창 */
.hero { background-color: var(--paper); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; border-bottom: 1px solid var(--line); }
.hero-in { padding-top: clamp(40px, 8vw, 88px); padding-bottom: clamp(40px, 7vw, 80px); }
.eyebrow { font: 700 .82rem/1.4 var(--sans); letter-spacing: .02em; color: var(--muted); margin: 0 0 .9em; }
.hero h1 { font: 400 clamp(2.1rem, 6.4vw, 4.1rem)/1.12 var(--display); margin: 0 0 .7em; letter-spacing: -.005em; }
.search { position: relative; max-width: 680px; }
.search input { width: 100%; font: 500 1.08rem/1.4 var(--sans); padding: 18px 20px; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.search input::placeholder { color: #8A949C; }
.search input:focus { outline: none; box-shadow: 6px 6px 0 var(--specimen); border-color: var(--specimen); }
.search.slim { margin: 0 0 28px; }
.search.slim input { padding: 13px 16px; font-size: 1rem; box-shadow: 4px 4px 0 var(--ink); }
.search-count { font-size: .9rem; color: var(--muted); margin: 18px 0 0; }
.search-count b { font-family: var(--mono); color: var(--ink); }
.results { list-style: none; margin: 10px 0 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; max-height: 360px; overflow-y: auto; }
.results li a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.results li:last-child a { border-bottom: 0; }
.results li a:hover, .results li a:focus-visible { background: var(--specimen-soft); }
.results .r-no { font: 500 .78rem/1.6 var(--mono); color: var(--muted); flex: none; }
.results .r-empty { padding: 12px 16px; color: var(--muted); }

/* 목록 블록 */
.block { padding-top: 48px; }
.block:last-of-type { padding-bottom: 64px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 18px; }
.block-head h2 { margin: 0; font-size: 1.15rem; }
.block-head a { font-size: .92rem; font-weight: 600; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.card a { display: grid; gap: 4px; padding: 14px 16px 15px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink); height: 100%; transition: transform .12s ease, border-color .12s ease; }
.card a:hover { border-color: var(--ink); transform: translateY(-2px); }
.card a:active { transform: translateY(0); }
.card-no { font: 500 .74rem/1.4 var(--mono); color: var(--muted); letter-spacing: .04em; }
.card-name { font-weight: 800; font-size: 1.06rem; line-height: 1.35; }
.card-name small { font-weight: 600; font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; margin-left: 4px; vertical-align: 2px; }
.card-meta { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.d-alert { background: var(--specimen); }
.d-news { background: var(--ink); }
.d-none { background: transparent; border: 1.5px solid var(--muted); }

.kinds, .guides { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.kinds a, .guides a { display: grid; gap: 6px; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: 4px; text-decoration: none; color: var(--ink); height: 100%; }
.kinds a:hover, .guides a:hover { border-color: var(--ink); }
.kinds b, .guides b { font-size: 1.05rem; }
.kinds span, .guides span { font-size: .92rem; color: var(--muted); line-height: 1.6; }
.kinds em { font: 500 .78rem/1 var(--mono); font-style: normal; color: var(--specimen); }

.act-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.act-steps li { background: var(--ink); color: #fff; border-radius: 6px; padding: 16px; display: grid; gap: 2px; }
.act-steps b { font: 400 1.6rem/1.1 var(--display); }
.act-steps span { font-size: .9rem; color: #C9D0D4; }

/* 이름 기록 — 표본 라벨(시그니처) */
.crumbs { font-size: .85rem; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--muted); }
.file-head h1, .list-page h1, .prose-page h1 { font: 400 clamp(1.9rem, 5vw, 3rem)/1.18 var(--display); margin: 0 0 .6em; }
.file-head { padding: 24px 0 8px; }
.file-head .eyebrow { margin-bottom: .6em; }
.file-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; padding-bottom: 72px; }
.spec { position: sticky; top: 20px; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px 6px 6px 22px; padding: 22px 20px 18px; box-shadow: 6px 6px 0 var(--ink); }
.spec::before { content: ''; position: absolute; top: 14px; right: 16px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: var(--bg); }
.spec-no { margin: 0 0 12px; display: grid; }
.spec-no span { font: 600 .72rem/1.4 var(--sans); letter-spacing: .02em; color: var(--muted); }
.spec-no b { font: 600 1.55rem/1.1 var(--mono); letter-spacing: .02em; }
.spec-stamp { display: inline-block; margin: 0 0 14px; font: 700 .82rem/1 var(--sans); letter-spacing: .02em; padding: 7px 10px; border: 2px solid currentColor; border-radius: 3px; transform: rotate(-2deg); }
.s-alert { color: var(--specimen); }
.s-news { color: var(--ink); }
.s-none { color: var(--muted); border-style: dashed; }
.spec dl { margin: 0; border-top: 1px dashed var(--line); }
.spec dl > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.spec dt { font: 600 .78rem/1.9 var(--sans); color: var(--muted); }
.spec dd { margin: 0; font-weight: 600; line-height: 1.5; }
.spec dd small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }

.file-body, .prose-page { max-width: 720px; }
.prose-page { padding-bottom: 72px; }
.file-body > h2:first-of-type { margin-top: 1.6em; }
.lede { font-size: 1.08rem; line-height: 1.8; margin: 0 0 1em; }
.note { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--muted); padding: 12px 16px; font-size: .94rem; margin: 1em 0; border-radius: 0 4px 4px 0; }
.note.warn { border-left-color: var(--specimen); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.facts li { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; }
.facts p { margin: 0 0 6px; }
.cite { font-size: .84rem; color: var(--specimen); display: inline-block; }
.cite::before { content: '출처 '; font-weight: 700; font-size: .78rem; color: var(--muted); }
.signals { padding-left: 1.2em; }
.flow { list-style: none; counter-reset: f; margin: 0; padding: 0; border-left: 2px solid var(--ink); }
.flow li { counter-increment: f; position: relative; padding: 0 0 16px 24px; display: grid; gap: 2px; }
.flow li::before { content: counter(f); position: absolute; left: -12px; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 .74rem/22px var(--mono); text-align: center; }
.flow li:last-child { padding-bottom: 0; }
.flow b { font-size: .98rem; }
.flow span { color: #2E363D; }
.checks { padding-left: 1.2em; }
.checks li { margin: .35em 0; }
.checks li::marker { color: var(--specimen); }
.todo { padding-left: 1.4em; }
.todo li { margin: .55em 0; }
.todo li::marker { font-family: var(--mono); font-weight: 600; }
.todo b { margin-right: 6px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 6px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; text-decoration: none; color: var(--ink); }
.chips a:hover { border-color: var(--ink); }
.sources { margin-top: 2.6em; border-top: 2px solid var(--ink); padding-top: 4px; }
.sources h2 { font-size: .95rem; letter-spacing: .02em; margin: 1em 0 .6em; }
.sources ol { padding-left: 1.4em; font-size: .88rem; color: var(--muted); }
.sources li { margin: .3em 0; }
.fix { font-size: .88rem; color: var(--muted); margin-top: 2em; }
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .94rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font: 700 .82rem/1.4 var(--sans); color: var(--muted); border-bottom: 2px solid var(--ink); }
tbody th { font: 600 1rem/1.5 var(--mono); white-space: nowrap; }
.list-page { padding-bottom: 72px; }
.list-page .lede { max-width: 680px; }
.legend > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.legend dt { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.legend dd { margin: 0; }

/* 바닥 */
.foot { background: var(--ink); color: #B8C1C7; font-size: .88rem; padding: 36px 0 44px; }
.foot p { margin: 0 0 .8em; max-width: 760px; }
.foot a { color: #fff; }
.foot-brand { display: flex; align-items: center; gap: 8px; color: #fff; }
.foot-brand .mark { width: 20px; height: 20px; }
.foot-brand b { font: 400 1.05rem/1 var(--display); }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-op { font-family: var(--mono); font-size: .78rem; color: #8994A0; }
.prose-page .foot-op { color: var(--muted); }

@media (max-width: 860px) {
  .file-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .spec { position: static; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .act-steps { grid-template-columns: minmax(0, 1fr); }
  .act-steps li { grid-template-columns: 96px minmax(0, 1fr); align-items: center; }
  .kinds, .guides, .cards { grid-template-columns: minmax(0, 1fr); }
  .search input { box-shadow: 4px 4px 0 var(--ink); }
  .legend > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .menu a { padding: 6px 8px; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { .card a { transition: none; } .card a:hover { transform: none; } }
.results .r-empty a { display: inline; padding: 0; border: 0; color: var(--specimen); text-decoration: underline; }
.results .r-empty a:hover { background: none; }

/* 검색 — 기록에 없는 이름 → 확인 리포트 */
.results .r-new a { background: var(--ink); color: #fff; }
.results .r-new a:hover, .results .r-new a:focus-visible { background: var(--specimen); }
.results .r-new .r-no { color: #fff; }
.results small { color: var(--muted); }
.empty-q { background: var(--paper); border: 1px dashed var(--ink); border-radius: 6px; padding: 14px 16px; margin: 0 0 20px; }
.report { padding-top: 28px; }
.report h1 { overflow-wrap: anywhere; }
.rep-status { display: grid; gap: 4px; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; padding: 16px 18px; margin: 0 0 14px; box-shadow: 4px 4px 0 var(--ink); }
.rep-status b { font: 400 1.3rem/1.2 var(--display); }
