/* 출근일진 정적 페이지(가이드·정책) 공통 스타일. 앱(styles.css)과 같은 차분한 생활앱 톤. */
:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --ink: #1b1b1d;
  --sub: #5f5f65;
  --faint: #8e8e94;
  --line: #e9e7e2;
  --soft: #f7f6f3;
  --g: #b8901a;
  --g-soft: #faf4df;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 4px 16px rgba(20, 20, 20, .04);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.75;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: rgba(27, 27, 29, .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--g); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 10px; }

/* 머리 */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(244, 243, 239, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .in, .site-foot .in { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.site-head .in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; letter-spacing: -0.03em; text-decoration: none; }
.brand img { border-radius: 8px; }
.brand span { font-weight: 600; color: var(--sub); }
.open-app { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }

/* 본문 */
.doc { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }
.crumb { font-size: 13.5px; color: var(--faint); margin: 4px 0 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumb a { color: var(--sub); }
article { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 22px 32px; }
h1 { font-size: 27px; line-height: 1.35; letter-spacing: -0.035em; margin: 0 0 14px; font-weight: 800; }
h2 { font-size: 20px; line-height: 1.4; letter-spacing: -0.03em; margin: 36px 0 10px; font-weight: 750; }
h3 { font-size: 17px; margin: 0 0 6px; font-weight: 700; letter-spacing: -0.02em; }
h3 small { display: block; font-size: 13.5px; font-weight: 600; color: var(--sub); margin-top: 2px; }
p { margin: 10px 0 0; }
.lede { font-size: 17.5px; color: #333336; margin: 0; }
.meta { font-size: 13.5px; color: var(--faint); margin: 12px 0 0; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
ul, ol { padding-left: 1.3em; margin: 10px 0 0; }
li { margin: 6px 0; }
li::marker { color: var(--faint); }
b, strong { font-weight: 700; }

.callout { background: var(--g-soft); border-radius: 16px; padding: 16px 18px; margin: 22px 0 0; }
.callout > b { display: block; font-size: 15px; }
.callout ul { margin-top: 6px; }
.big-mail { font-size: 19px; font-weight: 700; margin-top: 6px; }

.tbl { width: 100%; border-collapse: collapse; margin: 14px 0 0; font-size: 15px; line-height: 1.6; display: block; overflow-x: auto; }
.tbl thead th { background: var(--soft); font-weight: 700; text-align: left; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 10px 10px; vertical-align: top; min-width: 88px; }
.tbl td:first-child { font-weight: 600; white-space: nowrap; }
@media (min-width: 640px) { .tbl { display: table; } }
/* 좁은 화면: 표가 부모 폭을 넘지 않게 줄바꿈을 허용(검수 ad10-r2-05 P1-5) */
@media (max-width: 639px) {
  .tbl { display: table; table-layout: auto; font-size: 14.5px; }
  .tbl th, .tbl td { min-width: 0; padding: 9px 7px; }
  .tbl td:first-child { white-space: normal; }
  /* 정책 표는 항목별 세로 목록으로 */
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack thead { display: none; }
  .tbl.stack tr { border: 1px solid var(--line); border-radius: 14px; padding: 6px 14px 8px; margin: 10px 0 0; }
  .tbl.stack td { border: 0; padding: 5px 0; display: grid; grid-template-columns: 76px 1fr; gap: 10px; font-weight: 400; }
  .tbl.stack td:first-child { font-weight: 700; }
  .tbl.stack td::before { content: attr(data-label); font-size: 13px; font-weight: 600; color: var(--faint); }
}

/* 광고 칸: 운영자가 scripts/set-site-url.mjs 로 광고 코드를 채우기 전엔 비어 있어 보이지 않음.
   채워지면 '광고' 라벨 + 높이 예약(밀림 방지). 정책 페이지에는 두지 않는다. */
.ad-slot:empty { display: none; }
.ad-slot { margin: 24px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); text-align: center; overflow: hidden; }
article .ad-slot { margin: 28px 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.doc > .ad-slot { background: var(--surface); border: 0; border-radius: 16px; box-shadow: var(--shadow); padding: 8px 12px 12px; }
.ad-slot .ad-label { display: block; text-align: left; font-size: 11px; color: var(--faint); letter-spacing: 0; margin: 0 0 6px; }
.ad-slot ins { display: block; margin: 0 auto; }
.ad-slot[data-ad="guide-mid"] { min-height: 290px; }
.ad-slot[data-ad="guide-end"] { min-height: 136px; }

dl.terms { margin: 14px 0 0; }
dl.terms dt { font-weight: 750; margin-top: 18px; font-size: 16.5px; }
dl.terms dt span { font-weight: 600; font-size: 13.5px; color: var(--g); margin-left: 6px; }
dl.terms dd { margin: 4px 0 0; color: #333336; }

.type { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 14px 0 0; }
.type p { margin-top: 6px; }
.tip { font-weight: 600; color: var(--g); font-size: 15px; }

.grade-grid { display: grid; gap: 12px; margin: 24px 0 0; }
.grade { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: start; border-radius: 16px; padding: 16px; }
.grade img { width: 84px; }
.grade p { margin-top: 4px; font-size: 15.5px; }
.g-yeoyu { background: #eaf7ee; } .g-jibjung { background: #fff0e6; } .g-munan { background: #fdf6dc; } .g-josim { background: #eaf2ff; } .g-swieo { background: #f1edff; }

.hero-fig { margin: 22px 0 0; display: flex; flex-direction: column; align-items: center; background: var(--soft); border-radius: 16px; padding: 18px; }
.hero-fig img { width: 150px; }
.hero-fig figcaption { font-size: 13.5px; color: var(--sub); margin-top: 8px; }
.pair { margin: 22px 0 0; display: flex; justify-content: center; gap: 24px; background: var(--soft); border-radius: 16px; padding: 18px; }
.pair img { height: 140px; width: auto; }
.note-fig { margin: 18px 0 0; display: flex; align-items: center; gap: 14px; background: var(--soft); border-radius: 14px; padding: 10px 16px 10px 12px; }
.note-fig img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.note-fig figcaption { font-size: 14px; line-height: 1.55; color: var(--sub); word-break: keep-all; overflow-wrap: anywhere; }
.note-fig figcaption b { display: block; font-size: 12.5px; font-weight: 700; color: var(--faint); letter-spacing: 0; }
/* 정보형 그림(앱 화면 캡처·표 그림). 그림 칸 높이는 내용에 맞추되 폭은 360px로 통일 */
.info-fig { margin: 22px 0 0; background: var(--soft); border-radius: 16px; padding: 16px 14px 12px; }
.info-fig img, .info-fig svg { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
.info-fig img { border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.info-fig figcaption { max-width: 360px; margin: 10px auto 0; font-size: 13.5px; line-height: 1.6; color: var(--sub); }

.faq h2 { font-size: 17.5px; margin-top: 28px; }
.faq h2::before { content: 'Q. '; color: var(--g); }

/* 같이 읽기·CTA */
.related { margin: 20px 0 0; }
.related h2, .hub-group h2 { font-size: 17px; margin: 28px 4px 10px; }
.related ul, .cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.related li, .cards li { margin: 0; }
.related a, .cards a { display: block; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px; text-decoration: none; }
.related a b, .cards a b { display: block; font-size: 16px; line-height: 1.45; }
.related a span, .cards a span { display: block; font-size: 14px; color: var(--sub); margin-top: 4px; line-height: 1.6; }
.cards a em { display: block; font-style: normal; font-size: 12.5px; color: var(--faint); margin-top: 6px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }

.cta-box { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 20px; margin: 28px 0 0; }
.cta-box img { width: 88px; }
.cta-box h2 { margin: 0; font-size: 18px; color: #fff; }
.cta-box p { margin: 4px 0 0; font-size: 14.5px; color: rgba(255, 255, 255, .78); line-height: 1.6; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; margin-top: 12px; border-radius: 12px; background: #fff; color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; }

.doc.wide > h1 { margin-top: 8px; }
.doc.wide > .lede { margin-bottom: 4px; }
.hub-intro { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: start; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin: 18px 0 0; }
.hub-intro img { width: 96px; }
.hub-intro p:first-child { margin-top: 0; }

/* 꼬리 */
.site-foot { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 13.5px; color: var(--sub); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 10px; }
.site-foot nav a { color: var(--ink); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.site-foot p { margin: 6px 0 0; line-height: 1.65; }

@media (max-width: 420px) {
  body { font-size: 16px; }
  h1 { font-size: 24px; }
  article { padding: 22px 18px 26px; }
  .grade { grid-template-columns: 64px 1fr; gap: 12px; padding: 14px; }
  .grade img { width: 64px; }
  .cta-box { grid-template-columns: 64px 1fr; }
  .cta-box img { width: 64px; }
  .hub-intro { grid-template-columns: 1fr; }
  .hub-intro img { width: 110px; margin: 0 auto; }
  .brand span { display: none; }
}
@media print { .site-head, .cta-box, .related { display: none; } article { box-shadow: none; } }
