/* 하루냥 정책 문서 공통 스타일. 휴대폰 폭 우선, 밝은·어두운 화면. */
:root {
  --bg: #faf3e6;
  --surface: #fffaf1;
  --text: #3b2f25;
  --muted: #7a6a5a;
  --line: #e6d8c2;
  --accent: #b5652f;
  --accent-soft: #f3e2cf;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1f1a16;
    --surface: #29231e;
    --text: #efe5d8;
    --muted: #b3a493;
    --line: #3e352d;
    --accent: #e39a62;
    --accent-soft: #3a2d22;
  }
}
:root[data-theme="dark"] {
  --bg: #1f1a16;
  --surface: #29231e;
  --text: #efe5d8;
  --muted: #b3a493;
  --line: #3e352d;
  --accent: #e39a62;
  --accent-soft: #3a2d22;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-header .inner, main, .site-footer .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}
.site-header .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }

main { padding-top: 28px; padding-bottom: 48px; }
h1 { font-size: 26px; line-height: 1.35; margin: 0 0 6px; }
h2 {
  font-size: 19px;
  margin: 36px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
h3 { font-size: 16px; margin: 20px 0 6px; }
.meta { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.lead { font-size: 17px; }
ul, ol { padding-left: 22px; }
li + li { margin-top: 4px; }

.note {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 16px 0;
}
.note p { margin: 0; }
.note p + p { margin-top: 6px; }

/* 표는 좁은 화면에서 표 안에서만 가로로 밀린다 (페이지는 밀리지 않음). */
.table-wrap {
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; line-height: 1.6; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { background: var(--accent-soft); font-weight: 700; white-space: nowrap; }

.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 24px 0; }
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
}
.card:hover { border-color: var(--accent); }
.card strong { display: block; font-size: 17px; margin-bottom: 4px; color: var(--accent); }
.card span { color: var(--muted); font-size: 14px; }

.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 36px; margin-top: 10px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: var(--bg);
  font-size: 13px; font-weight: 700; text-align: center; line-height: 24px;
}

details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
summary { cursor: pointer; font-weight: 700; }
details p { margin: 8px 0 2px; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer .inner { padding-top: 16px; padding-bottom: 24px; }
.site-footer p { margin: 0; }

/* 좁은 화면: 표의 각 줄을 제목 붙은 카드로 쌓는다 (옆으로 밀지 않아도 다 보이게). */
@media (max-width: 600px) {
  .table-wrap { overflow: visible; border: 0; background: none; }
  table { min-width: 0; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 0; margin-bottom: 10px; }
  td { border: 0; padding: 4px 14px; }
  td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
  td:first-child { font-weight: 700; font-size: 15px; }
  td:first-child::before { display: none; }
}
