/* 다룸의 법률 스토리 — 개별 게시물 전용 스탠드얼론 페이지 스타일
   mockup/index.html의 :root 변수·story-card 계열 규칙을 그대로 계승한 경량 부분집합.
   원본이 바뀌면 이 파일도 함께 갱신해야 한다(자동 동기화 아님). */

:root {
  color-scheme: only light;
  --paper-0: #F5E9D3;
  --paper-1: #F7F1E4;
  --line-1: #D9CCB2;
  --ink-0: #262219;
  --ink-1: #3B362C;
  --ink-2: #5C564A;
  --font-sans: "Noto Serif KR", "Noto Serif CJK KR", "Source Han Serif KR", "Batang", "바탕", serif;
  --font-serif: "Nanum Myeongjo", "AppleMyungjo", "Apple Myungjo", "Noto Serif KR", "Noto Serif CJK KR", "Source Han Serif KR", "Batang", "바탕", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper-0);
  color: var(--ink-0);
}

body { padding: 0; }

.standalone-wrap { max-width: 720px; margin: 0 auto; padding: 28px 20px 60px; }

.standalone-header { display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid rgba(38,34,25,0.22); }
.standalone-brand { font-family: var(--font-serif); font-size: 20px; font-weight: 700;
  color: var(--ink-0); text-decoration: none; letter-spacing: -0.02em; }
.standalone-brand:hover { opacity: 0.85; }
.standalone-tag { font-size: 12px; color: var(--ink-2); }

.standalone-footer { margin-top: 32px; padding-top: 16px; border-top: 1px dashed rgba(38,34,25,0.22);
  font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }
.standalone-footer a { color: var(--ink-1); }
.standalone-footer p { margin: 0 0 6px; }
.standalone-footer p { word-break: keep-all; }

.ph { display: inline; }

/* ── story-card 본문 (mockup/index.html 계승) ── */
.story-card h2 { font-family: var(--font-serif); font-size: 22px; font-weight: 600; line-height: 1.4; margin: 0 0 14px; color: var(--ink-0); }
.story-card .story-meta { font-size: 11.5px; color: var(--ink-2); letter-spacing: 0.03em; margin: 0 0 8px; }
.story-card .lead { font-size: 15.5px; line-height: 1.8; color: var(--ink-1); margin: 0 0 18px; }
.story-card h3 { font-family: var(--font-serif); font-size: 16px; font-weight: 600; color: var(--ink-0); margin: 22px 0 7px; letter-spacing: 0.01em; }
.story-card > p, .story-card p { font-size: 14.5px; line-height: 1.85; color: var(--ink-1); margin: 0 0 14px; }
.story-card .story-notice { font-size: 11.5px; color: var(--ink-2); margin-top: 20px; padding-top: 12px; border-top: 1px dashed rgba(38,34,25,0.18); }

.story-faq { margin-top: 22px; padding-top: 18px; border-top: 1px dashed rgba(38,34,25,0.22); }
.story-faq h3 { margin-top: 0; }
.story-faq .qa { margin-bottom: 14px; }
.story-faq .q { font-size: 14px; font-weight: 600; color: var(--ink-0); margin: 0 0 4px; }
.story-faq .a { font-size: 14px; line-height: 1.75; color: var(--ink-2); margin: 0; }

/* 표·도식 컴포넌트 */
.story-fig { margin: 18px 0 4px; padding: 0; }
.story-fig-title { font-family: var(--font-serif); font-size: 14px; font-weight: 600;
  color: var(--ink-0); letter-spacing: 0.02em; line-height: 1.5; margin: 0 0 8px; }
.story-card .story-fig-note { font-size: 12.5px; line-height: 1.7; color: var(--ink-2); margin: 8px 0 0; }

.story-table-wrap { width: 100%; overflow-x: auto; }
.story-table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.7;
  background: rgba(247,241,228,0.55); }
.story-table caption { caption-side: top; text-align: left; font-family: var(--font-serif);
  font-size: 14px; font-weight: 600; color: var(--ink-0); letter-spacing: 0.02em;
  line-height: 1.5; padding: 0 0 8px; }
.story-table th, .story-table td { text-align: left; vertical-align: top; padding: 9px 12px;
  border-bottom: 1px solid rgba(38,34,25,0.16); word-break: keep-all; }
.story-table thead th { font-family: var(--font-serif); font-size: 13px; font-weight: 600;
  color: var(--ink-0); background: rgba(38,34,25,0.07); letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(38,34,25,0.30); }
.story-table tbody th { font-weight: 600; color: var(--ink-0); background: rgba(38,34,25,0.035); }
.story-table td { color: var(--ink-1); }
.story-table tbody tr:last-child th, .story-table tbody tr:last-child td { border-bottom: none; }

.story-flow { display: flex; flex-direction: column; margin: 0; }
.story-flow-step { position: relative; border: 1px solid rgba(38,34,25,0.22);
  background: rgba(247,241,228,0.55); padding: 12px 15px; }
.story-flow-step + .story-flow-step { margin-top: 24px; }
.story-flow-step + .story-flow-step::after { content: ""; position: absolute;
  left: 50%; margin-left: -0.5px; top: -24px; width: 1px; height: 14px;
  background: rgba(38,34,25,0.30); }
.story-flow-step + .story-flow-step::before { content: ""; position: absolute;
  left: 50%; margin-left: -5px; top: -10px; width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 9px solid rgba(38,34,25,0.42); }
.story-flow-when { font-family: var(--font-serif); font-size: 13px; font-weight: 600;
  color: var(--ink-0); letter-spacing: 0.02em; line-height: 1.5; margin: 0 0 4px; }
.story-flow-what { font-size: 13.5px; line-height: 1.72; color: var(--ink-1); margin: 0; }
.story-flow-step.is-result { border-style: dashed; background: none; }
.story-flow-when:last-child { margin-bottom: 0; }

.story-keybox { margin: 18px 0 4px; padding: 15px 17px;
  background: rgba(38,34,25,0.05); border: 1px solid rgba(38,34,25,0.14); }
.story-keybox-title { font-family: var(--font-serif); font-size: 13px; font-weight: 600;
  color: var(--ink-0); letter-spacing: 0.02em; margin: 0 0 8px; }
.story-keybox ul { margin: 0; padding-left: 18px; }
.story-keybox li { font-size: 13.5px; line-height: 1.75; color: var(--ink-1); margin: 0 0 4px; }
.story-keybox li:last-child { margin-bottom: 0; }

/* 게시물 하단 변호사 네임카드 */
.author-card { margin-top: 26px; color: var(--ink-0); }
.author-name { margin: 0; font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.035em; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px 2px;
  border: 1px solid rgba(38, 34, 25, 0.34); color: var(--ink-1); font-size: 10.5px; font-weight: 700; line-height: 1.35; }
.badge::before { width: 3px; height: 3px; margin-right: 6px; background: currentColor; border-radius: 50%; content: ""; }
.author-areas { margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.7; }
.author-intro { margin: 0; color: var(--ink-1); font-size: 13.5px; line-height: 1.78; }
.credential-title { display: block; color: var(--ink-2); font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em; line-height: 1.5; }
.credential-list { margin: 0; padding: 0; list-style: none; }
.credential-list li { position: relative; color: var(--ink-2); font-size: 10.8px; line-height: 1.62; }

.dossier { border: 1px solid rgba(38, 34, 25, 0.42); }
.dossier-topline { display: flex; justify-content: space-between; align-items: center; min-height: 31px;
  padding: 7px 12px 6px; color: var(--paper-1); background: #322C24; font-size: 8.5px; font-weight: 700; letter-spacing: 0.14em; }
.dossier-head { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(190px, 1.2fr); gap: 18px;
  padding: 19px 20px 17px; border-bottom: 1px solid rgba(38, 34, 25, 0.28); }
.dossier .author-name { font-size: 23px; line-height: 1.28; }
.dossier .author-name small { display: block; margin-top: 5px; color: var(--ink-2); font-family: var(--font-sans);
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em; }
.dossier .badges { align-content: start; justify-content: flex-end; }
.dossier-main { padding: 17px 20px 19px; }
.dossier-field { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 15px; }
.dossier-field + .dossier-field { margin-top: 13px; padding-top: 13px; border-top: 1px dashed rgba(38, 34, 25, 0.2); }
.dossier-field .credential-title { padding-top: 2px; }
.dossier-credentials { display: grid; grid-template-columns: 1.2fr 0.8fr 1fr; border-top: 1px solid rgba(38, 34, 25, 0.3); }
.dossier-credential { padding: 15px 20px 17px; }
.dossier-credential + .dossier-credential { border-left: 1px solid rgba(38, 34, 25, 0.3); }
.dossier-credential .credential-title { margin-bottom: 7px; }
.dossier-credential li { padding-left: 10px; }
.dossier-credential li::before { position: absolute; top: 0.68em; left: 0; width: 3px; height: 3px; background: var(--ink-2); content: ""; }
.dossier-credential li + li { margin-top: 3px; }

@media (max-width: 767px) {
  .standalone-wrap { padding: 20px 16px 44px; }
  .story-card h2 { font-size: 19px; }
  .story-table { font-size: 12px; }
  .story-table caption { font-size: 12.5px; }
  .story-table th, .story-table td { padding: 8px 8px; }
  .story-fig-title, .story-flow-when { font-size: 12px; }
  .story-flow-what, .story-keybox li { font-size: 12.5px; }
  .dossier-head { grid-template-columns: 1fr; gap: 11px; padding-right: 16px; padding-left: 16px; }
  .dossier .badges { justify-content: flex-start; }
  .dossier-main { padding-right: 16px; padding-left: 16px; }
  .dossier-field { grid-template-columns: 1fr; gap: 6px; }
  .dossier-credentials { grid-template-columns: 1fr; }
  .dossier-credential { padding-right: 16px; padding-left: 16px; }
  .dossier-credential + .dossier-credential { border-top: 1px solid rgba(38, 34, 25, 0.3); border-left: 0; }
}

/* ── TECHFIX S-4 보강 (2026-10-01) ──────────────────────────────────────
   아래는 mockup/index.html 인라인 CSS의 동명 규칙을 값 변경 없이 그대로 옮긴 것이다
   (.story-fig img · .story-summary · .story-summary-title · .is-mark · .story-flow-branch · .is-parallel).
   게시물 독립 페이지가 홈 화면과 같은 모양으로 그려지게 하는 보강이며, 원본이 바뀌면 함께 갱신한다. */
.story-fig img { display: block; width: 100%; height: auto; border: 1px solid rgba(38,34,25,0.22); }

  .story-flow-step.is-mark { border-color: rgba(38,34,25,0.55); background: rgba(38,34,25,0.08); }

  /* 분기 — 한 단계 안에서 갈라지는 선택지 */
  .story-flow-branch { display: flex; gap: 10px; margin-top: 9px; }
  .story-flow-branch > div { flex: 1 1 0; border: 1px dashed rgba(38,34,25,0.30);
    padding: 8px 10px; font-size: 12.5px; line-height: 1.65; color: var(--ink-1); }

  /* 나란히 — 순서가 아니라 병렬 관계일 때 (화살표 없음) */
  .story-flow.is-parallel { flex-direction: row; gap: 12px; }
  .story-flow.is-parallel > .story-flow-step { flex: 1 1 0; }
  .story-flow.is-parallel > .story-flow-step + .story-flow-step { margin-top: 0; }
  .story-flow.is-parallel > .story-flow-step + .story-flow-step::before,
  .story-flow.is-parallel > .story-flow-step + .story-flow-step::after { display: none; }

  /* 글 서두 핵심 쟁점 요약 박스 (2026-09-22) — 본문 중간 .story-keybox와 구별: 종이색 채움 + 좌측 잉크 바 + 번호 목록 */
  .story-summary { margin: 0 0 22px; padding: 16px 18px 14px; background: var(--paper-1);
    border: 1px solid rgba(38,34,25,0.30); border-left: 3px solid var(--ink-0); }
  .story-summary-title { font-family: var(--font-serif); font-size: 12px; font-weight: 700;
    letter-spacing: 0.10em; color: var(--ink-2); margin: 0 0 10px; }
  .story-summary ol { margin: 0; padding-left: 22px; }
  .story-summary li { font-size: 13.5px; line-height: 1.75; color: var(--ink-1); margin: 0 0 7px; }
  .story-summary li:last-child { margin-bottom: 0; }
  .story-summary li b { color: var(--ink-0); font-weight: 600; }
  .story-summary li::marker { font-family: var(--font-serif); color: var(--ink-2); }
  @media (max-width: 767px) {
    .story-summary { padding: 14px 14px 12px; }
    .story-summary li { font-size: 13px; }
  }

  /* 모바일(≤767px): 인라인 CSS의 모바일 블록 중 분기·나란히 규칙만 옮김 */
  @media (max-width: 767px) {
    .story-flow-branch { flex-direction: column; gap: 8px; }
    .story-flow.is-parallel { flex-direction: column; gap: 0; }
    .story-flow.is-parallel > .story-flow-step + .story-flow-step { margin-top: 12px; }
  }
