/* 벽사의례청 세계관 안내 — 공문서 × 근미래 현장단말 UI
   참고: 백영신 케이브덕 위젯(현장단말) 팔레트·모노 라벨·번호 헤더 */

:root {
  --bg: #070c12;
  --panel: #0e1820;
  --panel-2: #101a22;
  --panel-head: #111f28;
  --inset: #0b141b;
  --line: #1d2b36;
  --line-2: #263945;
  --line-3: #31505b;

  --text: #dce8ee;
  --text-hi: #f3f8fa;
  --text-mid: #a9bcc3;
  --text-low: #718995;
  --text-dim: #4f6874;

  --teal: #55d8c9;
  --teal-soft: #68d7cc;
  --teal-bg: #14242c;
  --teal-line: #28515a;
  --red: #d94b4b;
  --red-hi: #ef6666;
  --red-bg: #1d1114;
  --amber: #d8a85a;
  --green: #82bd8c;
  --seal: #d94b4b;

  --sans: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1040px;
  --r-lg: 14px;
  --r: 9px;
  --r-sm: 5px;
  --topbar-h: 58px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
/* 배경 격자 */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    linear-gradient(rgba(85,216,201,.035) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(85,216,201,.035) 1px, transparent 1px) 0 0 / 32px 100%,
    radial-gradient(80% 60% at 50% 0%, rgba(85,216,201,.06), transparent 70%);
}
main, .footer { position: relative; z-index: 1; }

h1, h2, h3, h4, h5 { line-height: 1.35; margin: 0; }
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
small { font-size: .74em; }
b { color: var(--text-hi); font-weight: 650; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 15px; } }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--teal); color: var(--bg); padding: 8px 14px;
}
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 8px rgba(85,216,201,.75);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .45; box-shadow: 0 0 2px rgba(85,216,201,.4); } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

/* ---------- 배지 ---------- */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 4px;
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; line-height: 1.5;
}
.badge--teal { background: var(--teal-bg); color: var(--teal-soft); border: 1px solid var(--teal-line); font-family: "Noto Sans KR", sans-serif; }
.badge--line { color: var(--text-low); border: 1px solid var(--line-2); }
.badge--red { background: var(--red); color: #fff; border: 1px solid var(--red-hi); box-shadow: 0 0 12px rgba(217,75,75,.2); font-family: "Noto Sans KR", sans-serif; }
.badge--redline { color: #e07a7a; border-color: #5a2a2e; }

.kicker {
  display: block; margin-bottom: 4px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; color: var(--teal);
}

/* ---------- 상단바 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  background: rgba(7,12,18,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: border-color .4s;
}
.topbar.is-night { border-color: #3a1e22; }
.topbar__inner {
  max-width: var(--wrap); margin: 0 auto; height: 100%;
  padding: 0 24px; display: flex; align-items: center; gap: 24px;
}
@media (max-width: 600px) { .topbar__inner { padding: 0 16px; } }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__seal {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--seal); color: #fff; border-radius: 6px;
  font-family: "Noto Sans KR", sans-serif; font-size: 16px; font-weight: 900;
  box-shadow: 0 0 12px rgba(217,75,75,.25);
}
.brand__name { font-weight: 700; font-size: 16px; line-height: 1.15; display: flex; flex-direction: column; color: var(--text-hi); }
.brand__name small { font-family: var(--mono); font-weight: 400; font-size: 9.5px; color: var(--text-low); letter-spacing: .16em; }

.nav { margin-left: auto; display: flex; gap: 2px; font-size: 14px; }
.nav a {
  text-decoration: none; padding: 6px 11px; border-radius: 6px;
  color: var(--text-low); border: 1px solid transparent; transition: color .2s, background .2s, border-color .2s;
}
.nav a:hover { color: var(--text-hi); background: rgba(255,255,255,.04); }
.nav .nav__em { color: var(--teal-soft); }
.nav a.is-active { color: var(--teal); background: var(--teal-bg); border-color: var(--teal-line); }
.is-night .nav a.is-active { color: #ef8a8a; background: var(--red-bg); border-color: #5a2a2e; }

.navtoggle {
  display: none; margin-left: auto;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px;
  color: var(--text); padding: 5px 12px; cursor: pointer;
}
@media (max-width: 860px) {
  .navtoggle { display: block; }
  .nav {
    position: absolute; top: var(--topbar-h); left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 8px 16px 14px;
    background: rgba(7,12,18,.97); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 10px 10px; font-size: 15px; }
}

.section { padding: 88px 0; }
@media (max-width: 600px) { .section { padding: 60px 0; } }
.paper--alt { background: linear-gradient(180deg, transparent, rgba(16,26,34,.55) 12%, rgba(16,26,34,.55) 88%, transparent); }

/* ---------- 표지 ---------- */
.cover { padding: 48px 0 80px; }
.sysbar {
  max-width: 780px; margin: 0 auto 10px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 12px; background: #0d151d; border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: #78909d;
}
.sysbar__link { display: flex; align-items: center; gap: 7px; }
.sysbar__sep { color: #30434f; }
.sysbar__fill { flex: 1 1 auto; }
.sysbar__ok { color: var(--teal); }

.doc {
  position: relative; max-width: 780px; margin: 0 auto;
  background: linear-gradient(180deg, #101923, #0d161e);
  border: 1px solid #29404d; border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 18px 50px rgba(0,0,0,.45);
  padding: 22px 30px 26px;
}
/* 모서리 브래킷 */
.doc::before, .doc::after {
  content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none;
  border: 2px solid var(--teal); opacity: .55;
}
.doc::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--r-lg); }
.doc::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--r-lg); }
@media (max-width: 600px) { .doc { padding: 18px 16px 20px; } }

.doc__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid var(--line-2);
}
.doc__fill { flex: 1 1 auto; }
.doc__no { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: #536d78; }

.doc__title {
  font-size: clamp(36px, 7.5vw, 58px); font-weight: 800; letter-spacing: -.02em; color: var(--text-hi);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px;
}
.doc__title span {
  font-family: "Noto Sans KR", var(--sans); font-size: .34em; font-weight: 400;
  color: var(--text-low); letter-spacing: .32em;
}
.doc__lead { margin: 14px 0 24px; font-size: 17px; color: #8fa6b1; max-width: 32em; }

.doc__table { width: 100%; border-collapse: separate; border-spacing: 0 6px; margin-bottom: 18px; font-size: 15px; }
.doc__table th, .doc__table td {
  background: var(--panel); border-top: 1px solid #223844; border-bottom: 1px solid #223844; padding: 10px 12px; text-align: left;
}
.doc__table th {
  width: 92px; border-left: 1px solid #223844; border-radius: 8px 0 0 8px; white-space: nowrap;
  font-weight: 500; font-size: 12.5px; letter-spacing: .14em; color: var(--text-low);
}
.doc__table th::before {
  content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%;
  background: var(--teal); margin-right: 8px; vertical-align: 3px;
}
.doc__table td { border-right: 1px solid #223844; border-radius: 0 8px 8px 0; color: var(--text-hi); font-weight: 500; }

.doc__seal {
  position: absolute; right: 30px; top: 74px; width: 108px;
  opacity: 0; animation: stamp .55s .5s cubic-bezier(.2,.8,.3,1.2) forwards;
  filter: drop-shadow(0 0 10px rgba(217,75,75,.35));
}
@keyframes stamp {
  0% { opacity: 0; transform: scale(1.5); }
  100% { opacity: .92; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .doc__seal { animation: none; opacity: .92; } }
@media (max-width: 700px) {
  .doc__seal { width: 70px; right: 14px; top: 96px; }
  .kicker, .doc__title { padding-right: 78px; }
}
.seal rect { fill: rgba(217,75,75,.06); stroke: var(--seal); stroke-width: 5; }
.seal .seal__inner { fill: none; stroke-width: 1.5; }
.seal__text text {
  fill: var(--seal); font-family: "Noto Serif TC", serif; font-weight: 900;
  font-size: 26px; text-anchor: middle;
}
.seal__text .seal__big { font-size: 42px; }

.doc__notice {
  margin: 0; padding: 11px 13px; font-size: 13.5px; line-height: 1.7; color: #a3b6bd;
  background: #0b141a; border: 1px solid #1e313a; border-left: 3px solid var(--red); border-radius: var(--r-sm);
}
.doc__notice b { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--red-hi); margin-right: 8px; }

.cover__cta {
  display: flex; align-items: center; gap: 10px; width: max-content; margin: 28px auto 0;
  padding: 10px 16px; border: 1px solid var(--teal-line); border-radius: 10px; background: #0c151d;
  text-decoration: none; color: var(--text-hi); font-size: 15px; font-weight: 600;
  transition: background .2s, border-color .2s;
}
.cover__cta::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 9px rgba(85,216,201,.65);
}
.cover__cta:hover { background: #13232d; border-color: var(--line-3); }
.cover__cta span { color: var(--teal); }

/* ---------- 섹션 머리 (01 | 제목 · CODE) ---------- */
.sec-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 30px;
  background: var(--panel-head); border: 1px solid #223944; border-radius: 12px;
}
.sec-head__no { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--teal); }
.sec-head__bar { width: 1px; height: 22px; background: var(--line-3); }
.sec-head h2 { flex: 1 1 auto; font-size: clamp(20px, 3.4vw, 26px); font-weight: 750; letter-spacing: -.02em; color: var(--text-hi); }
.sec-head__code { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; color: #536c77; }
@media (max-width: 520px) { .sec-head__code { display: none; } }

.lead { font-size: 17px; color: var(--text-mid); max-width: 720px; margin-bottom: 22px; }
.subhead {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 700; color: var(--text-hi); margin: 48px 0 14px;
}
.subhead::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--teal); transform: rotate(45deg); flex: none; }
.subhead::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.note { font-size: 13.5px; color: var(--text-low); }

/* ---------- 카드 ---------- */
.grid2, .grid3, .grid4 { display: grid; gap: 10px; }
.grid2 { grid-template-columns: repeat(2, 1fr); }
.grid3 { grid-template-columns: repeat(3, 1fr); }
.grid4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid3, .grid4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel-2); border: 1px solid #223944; border-radius: var(--r);
  padding: 18px 18px 16px; font-size: 15px; color: var(--text-mid);
}
.card h3 {
  font-size: 16px; margin-bottom: 8px; color: var(--text-hi);
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.card h3 small { font-family: "Noto Sans KR", var(--sans); font-weight: 400; color: var(--text-low); letter-spacing: .1em; }
.card--folk { border-left: 3px solid var(--teal); }

.tag {
  display: inline-block; font-size: 13px; font-weight: 700;
  padding: 2px 9px; border-radius: 4px; border: 1px solid var(--line-3); color: var(--text-hi);
}
.tag--sm { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .1em; padding: 0 6px; color: var(--teal-soft); border-color: var(--teal-line); background: var(--teal-bg); }

.callout {
  margin-top: 16px; padding: 12px 14px; font-size: 14.5px; color: var(--text-mid);
  background: var(--inset); border: 1px solid #1e313a; border-left: 3px solid var(--teal); border-radius: var(--r-sm);
}

/* ---------- 직렬 색상 (상단 띠 + 태그) ---------- */
.card--rank { --rank: var(--line-3); box-shadow: inset 0 3px 0 var(--rank); }
.card--rank .tag { background: var(--rank); border-color: var(--rank); color: #fff; }
.card--rank p { margin-top: 12px; }
.card--admin { --rank: #3b74c9; }
.card--research { --rank: #f1f5f7; }
.card--research .tag { color: #0b141b; }
.card--analysis { --rank: #000; box-shadow: inset 0 3px 0 #000, inset 0 4px 0 #3a4b55; }
.card--analysis .tag { border-color: #3a4b55; }
.card--ritual { --rank: var(--red); }

button.card--rank {
  font: inherit; color: var(--text-mid); text-align: left; cursor: pointer; width: 100%;
  display: flex; flex-direction: column; align-items: flex-start; transition: background .2s, border-color .2s;
}
button.card--rank:hover { background: #13202a; }
.card__more {
  margin-top: auto; padding-top: 12px; font-size: 12.5px; font-weight: 600; color: #ef8a8a;
}
.card__more span { display: inline-block; transition: transform .2s; }
.card--ritual[aria-expanded="true"] { background: #161a21; border-color: #5a2a2e; }
.card--ritual[aria-expanded="true"] .card__more span { transform: rotate(180deg); }

.training {
  margin-top: 10px; padding: 16px 18px 6px;
  background: var(--panel-2); border: 1px solid #5a2a2e; border-top: 3px solid var(--red); border-radius: var(--r);
  animation: fadein .3s ease;
}
.training h3 { font-size: 16px; margin-bottom: 8px; color: var(--text-hi); }
.training h3 small { font-weight: 500; color: #ef8a8a; margin-left: 6px; }

/* ---------- 용어 ---------- */
.terms { margin: 0; }
.terms > div { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 10px 2px; border-top: 1px solid #1c2d35; }
.terms dt { font-weight: 700; color: var(--teal-soft); }
.terms dd { margin: 0; color: var(--text-mid); font-size: 15px; }
@media (max-width: 600px) { .terms > div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- 공개/비공개 ---------- */
.disclosure {
  margin-top: 10px; display: grid; grid-template-columns: 1fr 2fr;
  background: var(--panel-2); border: 1px solid #223944; border-radius: var(--r); overflow: hidden;
}
.disclosure__col { padding: 16px 18px; }
.disclosure__col h3 { font-size: 15px; margin-bottom: 10px; color: var(--teal); display: flex; align-items: center; gap: 8px; }
.disclosure__col h3::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.disclosure__col h3 small { font-weight: 400; color: var(--text-low); }
.disclosure__col--closed { border-left: 1px dashed #36505b; background: #0a1218; }
.disclosure__col--closed h3 { color: var(--amber); }
@media (max-width: 600px) {
  .disclosure { grid-template-columns: 1fr; }
  .disclosure__col--closed { border-left: 0; border-top: 1px dashed #36505b; }
}
.redact-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.redact {
  font: inherit; font-size: 14px; cursor: pointer; padding: 3px 10px; border-radius: 4px;
  background: repeating-linear-gradient(-45deg, #1e2b33 0 6px, #18232a 6px 12px);
  border: 1px solid #2c3e48; color: transparent; transition: background .3s, color .3s;
}
.redact span { user-select: none; }
.redact:hover { border-color: var(--amber); }
.redact.is-open { background: #1d1a12; color: #f0d9a8; border-color: #6b5530; }
.redact.is-open span { user-select: auto; }

/* ---------- 조직도 ---------- */
.org { font-size: 14px; }
.org__top { display: flex; flex-direction: column; align-items: center; }
.org__node {
  min-width: 140px; text-align: center; padding: 9px 18px; position: relative;
  border: 1px solid var(--line-3); border-radius: 8px; background: var(--panel-2);
  font-weight: 700; font-size: 16px; color: var(--text-hi);
}
.org__node + .org__node { margin-top: 24px; }
.org__node + .org__node::before {
  content: ""; position: absolute; left: 50%; top: -25px; height: 24px; border-left: 1px solid var(--teal-line);
}
.org__node--head { background: var(--teal-bg); border-color: var(--teal); color: var(--teal); box-shadow: 0 0 16px rgba(85,216,201,.12); }
.org__staff {
  margin-top: 12px; font-size: 12.5px; color: var(--text-low);
  border: 1px dashed var(--line-3); padding: 3px 12px; border-radius: 5px;
}
.org__units {
  margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--teal-line);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; position: relative;
}
.org__units::before { content: ""; position: absolute; left: 50%; top: -27px; height: 26px; border-left: 1px solid var(--teal-line); }
.org__unit {
  background: var(--panel-2); border: 1px solid #223944; border-radius: var(--r);
  padding: 14px 12px 12px; text-align: center; position: relative;
}
.org__unit::before { content: ""; position: absolute; left: 50%; top: -27px; height: 26px; border-left: 1px solid var(--teal-line); }
.org__unit h3 { font-size: 15px; margin-bottom: 6px; color: var(--text-hi); }
.org__unit p { font-size: 12.5px; color: var(--text-low); line-height: 1.6; }
.org__coop { margin-top: 16px; font-size: 13px; color: var(--text-low); text-align: center; }
@media (max-width: 760px) {
  .org__units { grid-template-columns: repeat(2, 1fr); border-top: 0; padding-top: 0; }
  .org__unit::before { display: none; }
}

/* ---------- 관련 내용 ---------- */
.related { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: -8px 0 8px; font-size: 14px; }
.related__label {
  font-size: 11.5px; font-weight: 700;
  color: var(--teal-soft); background: var(--teal-bg); border: 1px solid var(--teal-line); border-radius: 4px; padding: 1px 7px;
}
.related a { color: var(--text-hi); }
.related a:hover { color: var(--teal); }
.related__src { font-size: 12.5px; color: var(--text-low); }

/* ---------- 지역 ---------- */
.regions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.regions button {
  font-family: var(--sans); font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--panel); color: var(--text-mid); transition: background .2s, color .2s, border-color .2s;
}
.regions button:hover { border-color: var(--line-3); color: var(--text-hi); }
.regions button[aria-selected="true"] { background: var(--teal-bg); color: var(--teal); border-color: var(--teal); box-shadow: 0 0 12px rgba(85,216,201,.12); }

.region-panel {
  background: var(--panel-2); border: 1px solid #223944; border-radius: var(--r);
  padding: 18px 20px 14px; animation: fadein .3s ease;
}
.region h4 { font-size: 18px; margin: 0 0 8px; color: var(--text-hi); }
.region h5 {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--teal);
  margin: 18px 0 4px;
}
.region h5::after { content: ""; flex: 1; height: 1px; background: #1c2d35; }
.region h4 + h5 { margin-top: 4px; }
.region p { color: var(--text-mid); font-size: 15px; }
.region ul { list-style: none; padding: 0; margin: 0; }
.region li { padding: 8px 0; border-bottom: 1px solid #16242c; color: var(--text-mid); font-size: 15px; }
.region li:last-child { border-bottom: 0; }
.region li b { margin-right: 8px; }
.region__note {
  font-size: 13px !important; color: var(--text-low) !important;
  padding: 7px 9px; background: var(--inset); border: 1px dashed #36505b; border-radius: 6px;
}
.source {
  margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line-2);
  font-size: 12.5px; line-height: 1.75; color: var(--text-low);
}
.source a { color: var(--text-mid); }
.source a:hover { color: var(--teal); }
.region-hint { font-size: 13px; color: var(--text-dim); }
.region-hint::before { content: "› "; color: var(--teal); }

/* ---------- 자주 묻는 질문 ---------- */
.faq { display: grid; gap: 6px; }
.faq details { background: var(--panel-2); border: 1px solid #223944; border-radius: var(--r); overflow: hidden; }
.faq summary {
  cursor: pointer; list-style: none; padding: 12px 46px 12px 14px; font-weight: 650; color: var(--text-hi); position: relative;
  background: var(--panel-head);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "＋"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 23px; height: 23px; display: grid; place-items: center;
  border: 1px solid var(--line-3); border-radius: 5px; font-size: 13px; color: var(--teal);
}
.faq details[open] summary::after { content: "－"; }
.faq details[open] summary { border-bottom: 1px solid #223944; }
.faq details p { padding: 12px 14px 14px; color: var(--text-mid); font-size: 15px; }

/* ---------- 영·사건 (對外秘 / RESTRICTED) ---------- */
.ink { position: relative; overflow: hidden; }
.ink__wash {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 40% at 10% 0%, rgba(217,75,75,.12), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 3px);
  border-top: 1px solid #3a1e22; border-bottom: 1px solid #3a1e22;
}
.ink .wrap { position: relative; }
.ink__tags { display: flex; gap: 8px; margin-bottom: 12px; }
.sec-head--ink { background: #1a1418; border-color: #4a2529; }
.sec-head--ink .sec-head__no { color: var(--red-hi); }
.sec-head--ink .sec-head__bar { background: #5a2a2e; }
.sec-head--ink .sec-head__code { color: #8a5257; }

.ink-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 900px) { .ink-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ink-grid { grid-template-columns: 1fr; } }
.ink-card {
  background: #12141a; border: 1px solid #2d2329; border-radius: var(--r); padding: 18px; font-size: 15px;
}
.ink-card h3 { font-size: 16px; margin-bottom: 10px; color: var(--text-hi); }
.ink-card p { color: var(--text-mid); }
.ink-card--wide { grid-column: 1 / -1; border-left: 3px solid var(--red); }
.ink-card--line { margin-top: 22px; }
.ink-list { list-style: none; padding: 0; margin: 0; }
.ink-list li { padding: 6px 0; border-bottom: 1px solid #241c22; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.ink-list li:last-child { border-bottom: 0; }
.ink-list li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); flex: none; }
.ink-note { font-size: 13.5px; color: var(--text-low); margin-top: 12px; line-height: 1.7; }
.subhead--ink::before { background: var(--red); }
.subhead--ink::after { background: #2d2329; }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps li {
  counter-increment: s; position: relative;
  background: #12141a; border: 1px solid #2d2329; border-radius: 7px;
  padding: 10px 12px 10px 52px; font-size: 14.5px; color: var(--text);
}
.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--red-hi);
  padding-right: 9px; border-right: 1px solid #4a2529;
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.chips span {
  font-size: 13.5px; padding: 3px 10px; border-radius: 5px;
  background: #1a1418; border: 1px solid #4a2529; color: #e8c5c8;
}
.chips--paper span { background: var(--panel); border-color: var(--line-2); color: var(--text-mid); }

/* ---------- 나례 ---------- */
.card--narye { padding: 20px 20px 18px; border-left: 3px solid var(--amber); }
.footnote {
  margin-top: 16px; padding: 12px 14px; font-size: 14px;
  background: #0a1218; border: 1px dashed #36505b; border-radius: 7px;
}
.footnote h4 { font-size: 14.5px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; color: var(--text-hi); }
.footnote__mark {
  width: 22px; height: 22px; display: grid; place-items: center; flex: none;
  font-family: "Noto Sans KR", sans-serif; font-size: 11px; color: var(--amber); border: 1px solid #6b5530; border-radius: 4px;
}
.footnote ul { margin: 0; padding-left: 1.1em; color: var(--text-mid); }
.footnote li { padding: 3px 0; }
.footnote li::marker { color: var(--amber); }

/* ---------- 페르소나 ---------- */
.persona { background: var(--panel-2); border: 1px solid #29414d; border-radius: 12px; overflow: hidden; box-shadow: 0 14px 40px rgba(0,0,0,.35); }
.persona__tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px; background: #0c151d; border-bottom: 1px solid #223944; }
.persona__tabs button {
  font: inherit; font-size: 15px; font-weight: 650; cursor: pointer;
  background: var(--panel); color: var(--text-mid); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 11px 8px; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s, color .2s, border-color .2s;
}
.persona__tabs button:hover { color: var(--text-hi); border-color: var(--line-3); }
.persona__tabs button[aria-selected="true"] { background: var(--teal-bg); color: var(--text-hi); border-color: var(--teal); box-shadow: 0 0 14px rgba(85,216,201,.12); }
.persona__no {
  width: 22px; height: 22px; flex: none; display: grid; place-items: center;
  font-family: "Noto Sans KR", sans-serif; font-size: 12px; border: 1px solid var(--line-3); border-radius: 5px; color: var(--text-low);
}
.persona__tabs button[aria-selected="true"] .persona__no { background: var(--teal); border-color: var(--teal); color: #062022; font-weight: 800; }
@media (max-width: 760px) {
  .persona__tabs { grid-template-columns: repeat(2, 1fr); }
  .persona__tabs button { font-size: 14px; padding: 10px 6px; }
}

.persona__panel { padding: 9px; animation: fadein .3s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .persona__panel, .training, .region-panel { animation: none; } }

.form { display: grid; gap: 7px; }
.form__row { background: var(--inset); border: 1px solid #223741; border-radius: 8px; overflow: hidden; }
.form__label {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--panel-head); border-bottom: 1px solid #223944;
  font-size: 13.5px; font-weight: 700; color: var(--text-hi);
}
.form__label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 6px rgba(85,216,201,.6); flex: none; }
.form__label::after { margin-left: auto; font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .12em; color: #536c77; }
.form__row--fixed .form__label::after { content: "FIXED"; }
.form__row--ok { border-color: #2c4a34; }
.form__row--ok .form__label { background: #121c16; border-color: #2c4a34; color: #bfe6c5; }
.form__row--ok .form__label::before { background: var(--green); box-shadow: 0 0 6px rgba(130,189,140,.6); }
.form__row--ok .form__label::after { content: "ALLOWED"; color: #5f8a66; }
.form__row--ok .opts b::before { color: var(--green); }
.form__row--ok .opts li { border-color: #17251b; }
.form__row--warn { border-color: #4a2529; }
.form__row--warn .form__label { background: #1a1418; border-color: #4a2529; color: #f0b4b4; }
.form__row--warn .form__label::before { background: var(--red); box-shadow: 0 0 6px rgba(217,75,75,.6); }
.form__row--warn .form__label::after { content: "NOT ALLOWED"; color: #8a5257; }
.form__value { padding: 11px 13px; font-size: 15px; color: var(--text-mid); }

.opts { list-style: none; padding: 0; margin: 0; }
.opts li { padding: 7px 0; border-bottom: 1px solid #16242c; }
.opts li:last-child { border-bottom: 0; }
.opts b { margin-right: 8px; }
.opts b::before { content: "▸"; margin-right: 6px; color: var(--teal); font-weight: 400; }
.opts em { font-style: normal; color: var(--amber); }

.ban { list-style: none; padding: 0; margin: 0; }
.ban li { padding: 4px 0 4px 26px; position: relative; color: var(--text-mid); }
.ban li::before {
  content: "✕"; position: absolute; left: 0; top: 7px;
  width: 17px; height: 17px; display: grid; place-items: center;
  font-size: 10px; color: var(--red-hi); border: 1px solid #5a2a2e; border-radius: 4px; background: #1a1418;
}

.checklist {
  margin-top: 14px; padding: 14px 16px;
  background: #0a1218; border: 1px dashed #36505b; border-radius: 9px;
}
.checklist h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 8px; color: var(--amber); }
.checklist h3::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.checklist ul { margin: 0; padding-left: 1.2em; color: var(--text-mid); font-size: 15px; }
.checklist li { padding: 2px 0; }
.checklist li::marker { color: var(--amber); }

/* ---------- 바닥글 ---------- */
.footer { border-top: 1px solid var(--line-2); background: #060a0f; color: var(--text-low); font-size: 13.5px; line-height: 1.8; padding: 32px 0 26px; }
.footer b { color: var(--text-mid); }
.footer__auth { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.footer__seal {
  padding: 5px 10px; background: #172019; border: 1px solid #487052; border-radius: 5px;
  color: var(--green); font-family: "Noto Sans KR", sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .1em;
}
.footer__top {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-decoration: none;
  padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 5px; color: var(--text-mid);
}
.footer__top:hover { color: var(--teal); border-color: var(--teal-line); }
.footer__sys {
  display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 10px; border-top: 1px solid #162630;
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: #405762;
}
.footer__line { flex: 1; height: 1px; background: #1d3038; }
.footer__ok { color: #4e756f; }
.credit { white-space: nowrap; color: inherit; }
.credit__icon { width: 1em; height: 1em; fill: currentColor; vertical-align: -.15em; margin-right: 3px; }

/* ---------- 스크롤 등장 ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- 참고문헌 ---------- */
.refs { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ref {
  display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start;
  padding: 13px 14px; background: var(--panel-2); border: 1px solid #223944; border-radius: var(--r);
}
.ref__no {
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: var(--teal);
  padding: 2px 0; border-right: 1px solid var(--line-3);
}
.ref__body p { margin: 0; }
.ref__title { font-size: 16px; font-weight: 700; color: var(--text-hi); }
.ref__meta { margin-top: 2px !important; font-size: 14px; color: var(--text-mid); }
.ref__link {
  display: inline-block; margin-top: 6px; font-family: var(--mono); font-size: 12px; letter-spacing: .02em;
  color: var(--teal-soft); text-decoration: none; border-bottom: 1px solid var(--teal-line);
}
.ref__link::after { content: " ↗"; }
.ref__link:hover { color: var(--teal); border-color: var(--teal); }
.ref__use { margin-top: 8px !important; font-size: 13px; color: var(--text-low); }
.ref__use span {
  display: inline-block; margin-right: 8px; padding: 0 6px; border-radius: 4px;
  font-size: 11px; font-weight: 700; color: var(--text-mid); border: 1px solid var(--line-3);
}
@media (max-width: 520px) {
  .ref { grid-template-columns: 1fr; gap: 6px; }
  .ref__no { border-right: 0; }
}

/* ---------- 본문 내 출처 표기 · 이용 조건 ---------- */
.cite { margin-top: 10px; font-size: 12.5px; line-height: 1.75; color: var(--text-low); }
.cite a, .terms-of-use a { color: var(--teal-soft); }
.ref__link { overflow-wrap: anywhere; word-break: break-all; }
.terms-of-use { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.terms-of-use li {
  padding: 11px 13px; font-size: 14px; color: var(--text-mid);
  background: var(--inset); border: 1px solid #1e313a; border-left: 3px solid var(--teal); border-radius: var(--r-sm);
}
.terms-of-use b { display: block; margin-bottom: 2px; }
