/* 한사람 연구소 홈페이지 — 종이 바탕 · 먹 글씨 · 인주 도장 하나. 바깥 글꼴 · 스크립트 없음.
   다크 모드는 두지 않는다 — 하루새김 앱이 '밝은 종이 화면 하나'(DESIGN.md 다크 테마 행)라 사이트도 같게 */
:root {
  color-scheme: light;
  --paper: #f4f1ea;
  --sheet: #fbf9f4;
  --ink: #1f1d1a;
  --ink-soft: #5c574f;
  --line: #d9d3c7;
  --faint: #ece7dc;
  --seal: #b3261e;
  --serif: "Gowun Batang", "AppleMyungjo", "Nanum Myeongjo", "Noto Serif KR", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.75 var(--sans);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--seal); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 20px; }

/* 머리 — 도장 + 이름 */
.top { padding: 20px 0 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; text-decoration: none; }
.seal {
  width: 34px; height: 34px; flex: none;
  background: var(--seal); color: #fff;
  border-radius: 3px;
  display: grid; place-items: center;
  font: 700 17px/1 var(--serif); text-align: center;
}
.brand-name { font: 600 15px/1.2 var(--sans); }
.brand-name small { display: block; font: 12px/1.3 var(--mono); color: var(--ink-soft); letter-spacing: 0.02em; }

/* 앱 페이지 차례 — 모든 앱 페이지 같은 자리 · 같은 이름 */
.appnav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; margin: 8px -8px 0; font-size: 15px; }
.appnav .app-name { font-weight: 700; padding: 0 8px; margin-right: 4px; }
.appnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; border-radius: 4px; text-decoration: none; white-space: nowrap; }
@media (max-width: 520px) {
  .appnav .app-name { flex-basis: 100%; font-size: 13px; color: var(--ink-soft); font-weight: 600; margin: 4px 0 -6px; }
  .appnav { font-size: 14.5px; }
}
.appnav a:hover { background: var(--faint); color: var(--ink); }
.appnav a[aria-current="page"] { background: var(--faint); font-weight: 600; }

/* 본문 종이 */
.sheet {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 32px 28px 36px;
  margin: 12px 0 24px;
}
@media (max-width: 520px) { .sheet { padding: 24px 18px 28px; } }

h1 { font: 700 28px/1.35 var(--serif); margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font: 700 19px/1.45 var(--serif); margin: 36px 0 8px; }
h3 { font: 600 16px/1.5 var(--sans); margin: 22px 0 4px; }
p, ul, ol { margin: 8px 0; }
ul, ol { padding-left: 1.3em; }
li { margin: 4px 0; }
.lead { color: var(--ink-soft); margin-top: 4px; }
.meta { font: 13px/1.6 var(--mono); color: var(--ink-soft); }
.note { color: var(--ink-soft); font-size: 15px; }

/* 영수증 점선 */
hr { border: 0; border-top: 1px dashed var(--line); margin: 28px 0; }

/* 한눈에 보기 상자 */
.summary { border: 1px dashed var(--ink-soft); border-radius: 4px; padding: 14px 18px; margin: 18px 0 8px; }
.summary li { margin: 6px 0; }

/* 차례 */
.toc { margin: 18px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 16px; font-size: 15px; }
@media (max-width: 520px) { .toc { columns: 1; } }
.toc a { display: block; padding: 8px 0; text-decoration: none; border-bottom: 1px solid var(--faint); break-inside: avoid; }

/* 표 — 좁은 화면에서는 이름 아래로 내용을 쌓는다 */
table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 12px 0; }
thead th { font-size: 13px; color: var(--ink-soft); font-weight: 600; border-bottom: 1px solid var(--ink-soft); }
th, td { border-top: 1px solid var(--line); padding: 9px 10px 9px 0; text-align: left; vertical-align: top; }
tbody th { font-weight: 600; width: 7.5em; }
@media (max-width: 520px) {
  table.stack thead { display: none; }
  table.stack tr { display: block; border-top: 1px solid var(--line); padding: 8px 0; }
  table.stack th, table.stack td { display: block; border: 0; padding: 0; width: auto; }
  table.stack th { margin-bottom: 2px; }
}

/* 앱 목록 */
.app-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; }
.app-icon { width: 52px; height: 52px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; flex: none; text-decoration: none; }
.app-icon .seal { width: 36px; height: 36px; font-size: 15px; }
.app-icon .seal-4 { font-size: 13px; line-height: 1.05; letter-spacing: 0.02em; }
.app-card h3 { margin: 0; }
.app-card h3 a { text-decoration: none; }
.app-card p { margin: 2px 0 6px; color: var(--ink-soft); }

/* 링크 줄 — 누름 높이 44px, 줄 사이도 넉넉히 */
.links { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 -10px; font-size: 15px; }
.links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 4px; }
.links a:hover { background: var(--faint); color: var(--ink); }

/* 메일 — 가장 중요한 누름 지점 */
.mail { margin: 10px 0; }
.mail a {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 16px;
  border: 1px solid var(--ink); border-radius: 6px;
  font: 600 17px/1.3 var(--mono); text-decoration: none; word-break: break-all;
}
.mail a:hover { background: var(--faint); color: var(--ink); }

/* 자주 묻는 질문 */
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 10px 0; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--ink-soft); }
details[open] summary::after { content: "−"; }
details > :last-child { margin-bottom: 14px; }

.foot { padding: 4px 0 40px; font-size: 13px; color: var(--ink-soft); }
