/*
 * style.css — 사이트 공통 스타일
 * 계산기(index.html)와 항목 페이지(samangsingo.html 등)가 같이 쓴다.
 * 순서: ① 글꼴·색·기본값 → ② 계산기 화면 → ③ 계산기의 넓은 화면·인쇄
 *       → ④ 항목 페이지(긴 글 페이지) 전용 조각과 그 넓은 화면·인쇄.
 * 입력 칸·버튼·날짜 줄·판(jr-panel) 같은 조각은 두 종류의 페이지가 같이 쓴다.
 * 글꼴을 포함해 외부 주소에서 불러오는 것은 없다.
 */
/* 글꼴은 같은 폴더의 파일만 쓴다(외부에서 불러오지 않는다). */
@font-face {
  font-family: "Pretendard";
  src: url("fonts/PretendardVariable.woff2") format("woff2");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f2f0ea;
  --surface: #ffffff;
  --surface-soft: #f8f7f3;
  --ink: #1c2733;
  --ink-2: #47525f;
  --ink-3: #6b7683;
  --line: #e2ded4;
  --brand: #2f5362;
  --brand-grad: linear-gradient(135deg, #2b4a5c 0%, #4a7a80 100%);
  /* 상태 색: 여유 / 가까움 / 지남 / 날짜 없음. 빨강은 쓰지 않는다. */
  --ok-fg: #1f6552;    --ok-bg: #e7f2ee;    --ok-bar: #5aa38d;
  --soon-fg: #7a5300;  --soon-bg: #faf1da;  --soon-bar: #d3a445;
  --past-fg: #59616d;  --past-bg: #eeeff1;  --past-bar: #a9afb9;
  --none-bar: #c5cdda;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(28, 39, 51, 0.05), 0 6px 14px rgba(28, 39, 51, 0.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, p, ul, ol, dl, dd, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
p, li, dd, label { text-wrap: pretty; }
fieldset { border: 0; min-width: 0; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.jr-nowrap { white-space: nowrap; }

.jr-page { max-width: 780px; margin: 0 auto; padding: 28px 16px 56px; }

/* ── 제목부 ── */
.jr-hero { padding: 4px 4px 0; }
.jr-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px 7px 8px; border-radius: 100px;
  background: linear-gradient(180deg, #ffffff, #f4f3ee);
  border: 1px solid var(--line);
  box-shadow: 0 4px 10px rgba(28, 39, 51, 0.06);
  color: var(--brand); font-weight: 700; font-size: 16px; letter-spacing: -0.01em;
}
.jr-eyebrow svg { width: 30px; height: 30px; display: block; }
/* 항목·고지 페이지에서는 머리 이름이 계산기로 가는 링크다. 모양은 그대로 두고 밑줄만 없앤다. */
a.jr-eyebrow { text-decoration: none; }
a.jr-eyebrow:focus-visible { outline: 3px solid rgba(47, 83, 98, 0.35); outline-offset: 2px; }
.jr-h1 {
  margin-top: 18px;
  font-size: 28px; line-height: 1.3; font-weight: 800; letter-spacing: -0.03em;
}
.jr-h1 em {
  font-style: normal;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--brand);
}
.jr-lede { margin-top: 12px; color: var(--ink-2); }

/* 결과가 어떤 순서로 나오는지 보여주는 3단계 그림 */
.jr-steps { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 24px; }
.jr-step { position: relative; text-align: center; padding: 0 4px; }
.jr-step::before {
  content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px;
  background: var(--line);
}
.jr-step:first-child::before { display: none; }
.jr-step-num {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-grad); color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 0 0 5px var(--bg);
}
.jr-step-label { display: block; margin-top: 8px; font-size: 15px; font-weight: 600; color: var(--ink-2); line-height: 1.4; }

/* ── 공통 판(입력·카드·안내) ── */
.jr-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ── S1 입력 ── */
.jr-input { margin-top: 28px; padding: 24px 20px; }
.jr-field-label { display: block; font-weight: 700; font-size: 18px; }
.jr-date-input {
  display: block; width: 100%; min-height: 56px; margin-top: 10px; padding: 12px 16px;
  border: 1.5px solid #cfcabd; border-radius: 12px; background: var(--surface-soft);
  font-size: 19px; font-weight: 600;
  -webkit-appearance: none; appearance: none;
}
.jr-date-input:focus-visible, .jr-check input:focus-visible, .jr-btn:focus-visible,
.jr-text-btn:focus-visible, .jr-source-link:focus-visible, .jr-rare-toggle:focus-visible {
  outline: 3px solid rgba(47, 83, 98, 0.35); outline-offset: 2px;
}
.jr-help { margin-top: 8px; color: var(--ink-3); font-size: 16px; }
.jr-checks { margin-top: 26px; }
.jr-checks legend { padding: 0; font-weight: 700; font-size: 18px; }
.jr-check-list { display: grid; gap: 10px; margin-top: 12px; }
.jr-check {
  display: flex; align-items: center; gap: 12px; padding: 14px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface-soft);
  cursor: pointer;
}
.jr-check span { text-wrap: balance; }
.jr-check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--brand); }
.jr-check:has(input:checked) { border-color: #8fb0b3; background: #eef5f4; }
.jr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 12px 22px; border: 0; border-radius: 12px;
  background: var(--brand-grad); color: #fff; font-weight: 700; font-size: 18px;
  box-shadow: 0 6px 14px rgba(43, 74, 92, 0.22); cursor: pointer;
}
.jr-btn svg { width: 20px; height: 20px; flex: none; }
.jr-btn:disabled { background: #d9d6cd; color: #7d7a72; box-shadow: none; cursor: not-allowed; }
.jr-btn-quiet {
  background: var(--surface); color: var(--brand); border: 1.5px solid #b9c9cb;
  box-shadow: 0 2px 6px rgba(28, 39, 51, 0.05);
}
.jr-btn-quiet:disabled { background: var(--surface-soft); border-color: var(--line); }
.jr-calc { width: 100%; margin-top: 24px; }
.jr-reason { margin-top: 10px; text-align: center; color: var(--ink-3); font-size: 16px; }

/* ── S2 결과 ── */
.jr-result { margin-top: 40px; scroll-margin-top: 16px; outline: none; }
.jr-notice {
  padding: 16px 18px; border-radius: 14px; background: #e9eff0; border: 1px solid #d3dfe0;
  color: #2c3f49; font-size: 16px;
}
.jr-result-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 18px; padding: 0 4px; }
.jr-death { font-size: 18px; }
.jr-death span { color: var(--ink-3); margin-right: 8px; }
.jr-death strong { font-weight: 700; }
.jr-text-btn {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 100px; background: var(--surface);
  color: var(--brand); font-weight: 600; font-size: 16px; cursor: pointer;
}
.jr-actions { margin-top: 16px; }
.jr-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jr-ics-reason { margin-top: 8px; color: var(--ink-3); font-size: 16px; }

.jr-group { margin-top: 44px; }
.jr-group-head { padding: 0 4px; }
.jr-group-badge {
  display: inline-block; padding: 4px 14px; border-radius: 100px;
  background: linear-gradient(180deg, #ffffff, #f4f3ee); border: 1px solid var(--line);
  color: var(--brand); font-weight: 700; font-size: 15px;
}
.jr-group-title { margin-top: 10px; font-size: 23px; line-height: 1.35; font-weight: 800; letter-spacing: -0.02em; }
/* 묶음 제목 아래의 안내 한 줄(토·공휴일이면 기한이 늘어난다는 고지) */
.jr-group-note { margin-top: 10px; color: var(--ink-2); font-size: 16px; }
.jr-card-list { display: grid; gap: 14px; margin-top: 16px; }

.jr-card {
  position: relative; padding: 20px 18px 16px 22px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* 카드 왼쪽 띠 색으로 상태를 나타낸다(글자는 날짜 줄에 따로 있다). */
.jr-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--none-bar); }
.jr-card-ok::before { background: var(--ok-bar); }
.jr-card-soon::before { background: var(--soon-bar); }
.jr-card-past::before { background: var(--past-bar); }
.jr-tag {
  display: inline-block; margin-bottom: 10px; padding: 4px 12px; border-radius: 8px;
  background: #eef1f6; color: #46556f; font-size: 15px; font-weight: 600; line-height: 1.45;
}
.jr-card-title { font-size: 20px; line-height: 1.4; font-weight: 700; letter-spacing: -0.02em; }
.jr-custom-note { margin-top: 10px; color: var(--ink-2); }
.jr-date { margin-top: 12px; padding: 12px 14px; border-radius: 12px; }
.jr-status-ok { background: var(--ok-bg); color: var(--ok-fg); }
.jr-status-soon { background: var(--soon-bg); color: var(--soon-fg); }
.jr-status-past { background: var(--past-bg); color: var(--past-fg); }
.jr-date-label { font-weight: 700; font-size: 16px; }
.jr-date-line { line-height: 1.55; }
.jr-date-prefix { font-size: 16px; }
.jr-date-value { font-size: 19px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.jr-status-past .jr-date-value { color: var(--past-fg); }
.jr-date-tail { display: inline-block; font-weight: 600; white-space: nowrap; }
.jr-status-past .jr-date-sep { display: none; }
.jr-status-past .jr-date-tail { display: block; font-weight: 500; white-space: normal; }
.jr-note { margin-top: 10px; color: var(--ink-2); }
.jr-date-rows { display: grid; gap: 14px; margin-top: 4px; }
.jr-date-row .jr-note { margin-top: 6px; padding: 0 2px; font-size: 16px; }

.jr-facts { margin-top: 14px; border-top: 1px solid var(--line); }
.jr-fact { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.jr-fact dt { color: var(--ink-3); font-weight: 600; font-size: 16px; padding-top: 1px; }
.jr-fact dd { color: var(--ink); }

.jr-sources { display: grid; gap: 14px; margin-top: 14px; }
.jr-source { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.jr-source-about { flex: 1 1 180px; color: var(--ink-2); font-size: 16px; line-height: 1.45; }
.jr-source-link {
  flex: 0 1 auto; max-width: 100%; display: inline-block; padding: 6px 12px; border-radius: 100px;
  border: 1px solid #c4d2d4; background: #f3f7f7; color: var(--brand);
  font-size: 15px; font-weight: 600; text-decoration: none; line-height: 1.4;
}
.jr-checked { margin-top: 12px; color: var(--ink-3); font-size: 15px; }
/* 카드 맨 아래의 "자세히: ○○" 연결(같은 사이트의 항목 페이지로 간다) */
.jr-more-link {
  display: inline-block; margin-top: 12px; padding: 8px 14px; border-radius: 100px;
  border: 1px solid #b9c9cb; background: var(--surface); color: var(--brand);
  font-size: 16px; font-weight: 700; text-decoration: none; line-height: 1.4;
}
.jr-more-link::after { content: " ›"; }
.jr-more-link:focus-visible, .jr-ref:focus-visible, .jr-src-url:focus-visible, .jr-golink-btn:focus-visible {
  outline: 3px solid rgba(47, 83, 98, 0.35); outline-offset: 2px;
}

/* 드문 경우(접힘) */
.jr-rare { margin-top: 44px; overflow: hidden; }
.jr-rare-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 18px 20px; border: 0; background: transparent; text-align: left;
  font-size: 18px; font-weight: 700; cursor: pointer;
}
.jr-rare-toggle svg { flex: none; width: 22px; height: 22px; color: var(--ink-3); transition: transform 0.15s; }
.jr-rare-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.jr-rare-body { padding: 0 20px 8px; border-top: 1px solid var(--line); }
.jr-rare-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.jr-rare-item:last-child { border-bottom: 0; }
.jr-rare-item .jr-sources { margin-top: 10px; }
.jr-rare-item .jr-checked { margin-top: 8px; }

.jr-actions-bottom { margin-top: 28px; }

/* ── S3 하단 안내 ── */
.jr-foot { margin-top: 48px; padding: 22px 20px; background: var(--surface-soft); box-shadow: none; }
.jr-foot p { color: var(--ink-2); font-size: 16px; }
.jr-foot p + p { margin-top: 10px; }
.jr-foot .jr-foot-meta { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 15px; }
/* 맨 아래 링크 줄: 이용 안내 · 개인정보 처리방침(굵게) · 출처와 저작권 · 틀린 내용 알리기 (이메일은 글자) */
.jr-foot .jr-foot-links { color: var(--ink-3); font-size: 15px; line-height: 1.9; }
.jr-foot-links a { color: var(--brand); text-underline-offset: 3px; }
.jr-foot-links a:focus-visible { outline: 3px solid rgba(47, 83, 98, 0.35); outline-offset: 2px; }

/* 아주 좁은 휴대폰(360px 미만): 기간 날짜가 카드 밖으로 나가지 않게 줄바꿈을 허용한다. */
@media (max-width: 359px) {
  .jr-date-prefix { display: block; }
  .jr-date-value { white-space: normal; }
  .jr-page { padding-left: 12px; padding-right: 12px; }
}

/* ── 넓은 화면 ── */
@media (min-width: 720px) {
  body { font-size: 18px; }
  .jr-page { padding: 56px 24px 80px; }
  .jr-h1 { font-size: 38px; margin-top: 22px; }
  .jr-lede { font-size: 19px; }
  .jr-step-label { font-size: 17px; }
  .jr-input { padding: 32px; }
  .jr-check-list { grid-template-columns: 1fr 1fr; }
  .jr-calc { width: auto; min-width: 280px; }
  .jr-calc-row { display: flex; align-items: center; gap: 18px; margin-top: 28px; }
  .jr-calc-row .jr-calc { margin-top: 0; }
  .jr-reason { margin-top: 0; text-align: left; }
  .jr-notice, .jr-help, .jr-reason, .jr-foot p, .jr-source-about, .jr-date-prefix, .jr-date-label, .jr-ics-reason, .jr-group-note { font-size: 17px; }
  .jr-actions-row { grid-template-columns: repeat(2, minmax(0, 220px)); }
  .jr-group-title { font-size: 27px; }
  .jr-card { padding: 26px 28px 20px 32px; }
  .jr-card-title { font-size: 22px; }
  .jr-date-value { font-size: 21px; }
  .jr-status-past .jr-date-sep, .jr-status-past .jr-date-tail { display: inline; }
  .jr-fact { grid-template-columns: 84px 1fr; gap: 16px; }
  .jr-sources { gap: 8px; }
  .jr-fact dt, .jr-date-row .jr-note { font-size: 17px; }
  .jr-rare-body { padding: 0 28px 8px; }
  .jr-rare-toggle { padding: 22px 28px; font-size: 20px; }
  .jr-foot { padding: 28px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .jr-rare-toggle svg { transition: none; }
}

/* ── 인쇄(= PDF 저장): 입력과 버튼은 빼고 고지 1문장 + 카드 + 하단 안내만 ── */
@page { size: A4; margin: 14mm 13mm; }
@media print {
  body { background: #fff; font-size: 10.5pt; line-height: 1.5; }
  .jr-page { max-width: none; padding: 0; }
  .jr-hero, .jr-input, .jr-actions, .jr-text-btn, .jr-rare-toggle svg { display: none !important; }
  .jr-result { margin-top: 0; }
  /* 접힌 '드문 경우'도 종이에는 펼쳐서 낸다. */
  .jr-rare #jr-rare-body { display: block !important; }
  .jr-panel, .jr-card, .jr-notice { box-shadow: none; }
  .jr-notice, .jr-death, .jr-help, .jr-foot p, .jr-source-about, .jr-date-prefix, .jr-date-label,
  .jr-fact dt, .jr-date-row .jr-note, .jr-tag, .jr-checked, .jr-source-link, .jr-foot .jr-foot-meta, .jr-foot .jr-foot-links { font-size: 9.5pt; }
  .jr-group { margin-top: 18pt; }
  .jr-group-title { font-size: 15pt; }
  .jr-group-badge { font-size: 9pt; }
  .jr-group-note { font-size: 9.5pt; margin-top: 4pt; }
  .jr-group-head { break-after: avoid; page-break-after: avoid; }
  .jr-card-list { display: block; margin-top: 8pt; }
  .jr-card { padding: 10pt 12pt 8pt 16pt; margin-bottom: 8pt; border-radius: 8pt; break-inside: avoid; page-break-inside: avoid; }
  .jr-card-title { font-size: 12.5pt; }
  .jr-date { padding: 6pt 9pt; margin-top: 6pt; border: 1px solid #d5d5d5; }
  .jr-date-value { font-size: 12pt; }
  .jr-status-past .jr-date-sep, .jr-status-past .jr-date-tail { display: inline; }
  .jr-fact { grid-template-columns: 52pt 1fr; padding: 4pt 0; }
  .jr-facts, .jr-sources, .jr-note, .jr-custom-note { margin-top: 6pt; }
  .jr-sources { gap: 2pt; }
  .jr-source-link { padding: 0; border: 0; background: none; }
  /* 쪽이 넘어가도 테두리가 끊긴 채로 남지 않게 쪽마다 닫아 준다. */
  .jr-rare { margin-top: 18pt; overflow: visible; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  .jr-rare-toggle { padding: 10pt 12pt; font-size: 12.5pt; break-after: avoid; page-break-after: avoid; }
  .jr-rare-body { padding: 0 12pt; }
  .jr-rare-item { padding: 7pt 0; break-inside: avoid; page-break-inside: avoid; }
  .jr-foot { margin-top: 16pt; padding: 10pt 12pt; break-inside: avoid; page-break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ════════════ 항목 페이지 (samangsingo.html 등 긴 글 페이지) ════════════ */
.jr-article { max-width: 760px; }
/* 고지 3종(글만 있는 페이지) */
.jr-legal code { font-family: inherit; font-size: 0.95em; padding: 1px 6px; border-radius: 6px; background: #eceae3; }
.jr-legal .jr-foot .jr-foot-links { margin-top: 0; }
.jr-article p, .jr-article li, .jr-article td { line-height: 1.75; }
.jr-article .jr-h1 { margin-top: 16px; font-size: 30px; }

/* 구역 1: 답 한 문단 */
.jr-answer { margin-top: 24px; padding: 22px 20px 18px; border-left: 5px solid #4a7a80; }
.jr-answer > p:first-child { font-size: 18px; color: var(--ink); }
.jr-answer strong { font-weight: 700; }

/* 구역 제목과 구역 사이 간격 */
.jr-sec { margin-top: 48px; }
.jr-sec > * + * { margin-top: 16px; }
.jr-h2 { position: relative; padding-top: 14px; font-size: 23px; line-height: 1.38; font-weight: 800; letter-spacing: -0.02em; }
.jr-h2::before { content: ""; position: absolute; left: 0; top: 0; width: 28px; height: 4px; border-radius: 4px; background: var(--brand-grad); }
.jr-sec > p { color: var(--ink-2); padding: 0 2px; }
.jr-sec > p strong { color: var(--ink); }

/* 문장 끝의 작은 근거 링크 (기관명 + 근거 번호). 새 창으로 공식 사이트가 열린다. */
.jr-ref {
  display: inline; margin-left: 4px; padding: 2px 6px; border-radius: 6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: #e8f0f0; color: var(--brand); font-size: 13px; font-weight: 600;
  text-decoration: none; white-space: nowrap; vertical-align: 1px;
}

/* 순서가 있는 절차: 번호 동그라미를 세로줄로 잇는다 */
/* minmax(0, 1fr): 긴 주소처럼 끊기지 않는 글자가 있어도 칸이 화면 밖으로 늘어나지 않고 그 안에서 줄을 바꾼다. */
.jr-flow { counter-reset: jr-flow; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.jr-flow li { position: relative; counter-increment: jr-flow; padding: 0 0 20px 48px; color: var(--ink); }
.jr-flow li::before {
  content: counter(jr-flow); position: absolute; left: 0; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-grad); color: #fff; font-weight: 700; font-size: 16px;
}
.jr-flow li::after { content: ""; position: absolute; left: 15px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.jr-flow li:last-child { padding-bottom: 0; }
.jr-flow li:last-child::after { display: none; }

/* 순서가 없는 목록 */
.jr-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.jr-list li { position: relative; padding-left: 20px; color: var(--ink); }
.jr-list li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: #7fa7a8; }

/* 표. 2칸 표는 그대로, 3칸 이상 표(jr-table-stack)는 휴대폰에서 줄마다 쌓아 가로 넘침을 막는다. */
.jr-table-wrap { overflow: hidden; }
.jr-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.jr-table th, .jr-table td { padding: 13px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.jr-table thead th { padding: 9px 14px; background: var(--surface-soft); color: var(--ink-3); font-size: 15px; font-weight: 600; }
.jr-table tbody th { width: 36%; font-weight: 700; color: var(--ink); line-height: 1.55; }
.jr-table-short tbody th { width: 5.6em; white-space: nowrap; }
.jr-table tbody tr:last-child > * { border-bottom: 0; }
.jr-src-url { color: var(--brand); font-size: 15px; line-height: 1.5; word-break: break-all; text-underline-offset: 3px; }
/* 인쇄할 때는 종이 폭이 좁아도 쌓지 않고 표 그대로 낸다(screen에만 적용). */
@media screen and (max-width: 719px) {
  .jr-table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .jr-table-stack tr { display: block; padding: 16px 16px; border-bottom: 1px solid var(--line); }
  .jr-table-stack tbody tr:last-child { border-bottom: 0; }
  .jr-table-stack th, .jr-table-stack td { display: block; width: auto; padding: 0; border: 0; }
  .jr-table-stack tbody th { width: auto; font-size: 18px; }
  .jr-table-stack td { margin-top: 8px; }
  /* 쌓였을 때는 칸 이름(어떻게·어디서·근거)을 작은 글씨로 앞에 붙여 준다. */
  .jr-table-stack td[data-label]::before { content: attr(data-label); display: block; color: var(--ink-3); font-size: 14px; font-weight: 600; line-height: 1.5; }
  .jr-table-src tbody th { display: inline; font-size: 15px; color: var(--brand); }
  .jr-table-src td[data-label]::before { display: none; }
  .jr-table-src td[data-label="기관명"] { display: inline; margin: 0 0 0 8px; font-weight: 700; }
  .jr-table-src td { margin-top: 4px; }
}

/* 구역 3: 날짜 칸 */
.jr-datebox { margin-top: 48px; padding: 24px 20px; }
.jr-datebox .jr-h2 { margin-bottom: 20px; }
.jr-datebox-result { margin-top: 20px; }
.jr-datebox-result .jr-date { margin-top: 0; }

/* 구역 5: 다른 항목 페이지로 가는 작은 링크(계산기 연결 위에 온다). 2개면 나란히, 좁으면 아래로 내려간다. */
.jr-pagelinks { display: flex; flex-wrap: wrap; gap: 10px; }
.jr-pagelinks .jr-more-link { margin-top: 0; }

/* 계산기로 가는 연결(구역 3·5) */
.jr-golink { margin-top: 22px; padding: 18px; border-radius: 14px; background: #e9eff0; border: 1px solid #d3dfe0; }
.jr-golink-lead { color: #2c3f49; font-weight: 600; }
.jr-golink-btn { width: 100%; margin-top: 12px; text-align: center; text-decoration: none; }
.jr-golink-note { margin-top: 12px; color: var(--ink-2); font-size: 16px; }

@media (min-width: 720px) {
  .jr-article .jr-h1 { font-size: 40px; margin-top: 20px; }
  .jr-answer { padding: 28px 32px 22px; }
  .jr-answer > p:first-child { font-size: 20px; }
  .jr-sec { margin-top: 60px; }
  .jr-h2 { font-size: 27px; }
  .jr-ref { font-size: 13.5px; }
  .jr-table th, .jr-table td { padding: 14px 18px; }
  .jr-table thead th { padding: 10px 18px; font-size: 16px; }
  .jr-datebox { margin-top: 60px; padding: 32px; }
  .jr-golink { padding: 22px 24px; }
  .jr-golink-btn { width: auto; min-width: 300px; }
  .jr-golink-note { font-size: 17px; }
}

/* 표를 표 모양으로 보여줄 때(넓은 화면·인쇄)의 칸 너비 */
@media (min-width: 720px), print {
  .jr-table-stack tbody th { width: 24%; }
  .jr-table-src tbody th { width: 3.4em; white-space: nowrap; color: var(--brand); }
  .jr-table-src td:nth-child(2) { width: 9.5em; }
  .jr-table-src td:nth-child(3) { width: 34%; }
}

@media print {
  .jr-article .jr-eyebrow, .jr-datebox { display: none !important; }
  /* 종이에서는 누를 수 없으므로 계산기 연결을 단추 대신 굵은 글자로 낸다. */
  .jr-golink-btn { display: inline; min-height: 0; min-width: 0; padding: 0; margin: 0; background: none; box-shadow: none; color: var(--ink); font-size: 10.5pt; }
  /* 표가 다음 쪽으로 이어져도 테두리가 끊긴 채로 남지 않게 쪽마다 닫아 준다. */
  .jr-table-wrap { overflow: visible; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  .jr-article .jr-hero { display: block !important; }
  .jr-article .jr-h1 { font-size: 20pt; margin-top: 0; }
  .jr-article p, .jr-article li, .jr-article td { line-height: 1.55; }
  .jr-answer { margin-top: 10pt; padding: 10pt 12pt; }
  .jr-answer > p:first-child { font-size: 11pt; }
  .jr-sec { margin-top: 18pt; }
  .jr-sec > * + * { margin-top: 7pt; }
  .jr-h2 { font-size: 14pt; padding-top: 8pt; break-after: avoid; page-break-after: avoid; }
  .jr-ref, .jr-src-url, .jr-table thead th, .jr-golink-note { font-size: 8.5pt; }
  .jr-table th, .jr-table td { padding: 5pt 8pt; }
  .jr-table tr, .jr-flow li, .jr-list li, .jr-article p, .jr-golink { break-inside: avoid; page-break-inside: avoid; }
  /* 종이에서는 번호 동그라미를 줄이고, 한 줄짜리 항목끼리 동그라미가 맞닿지 않게 최소 높이를 둔다. */
  .jr-flow li { min-height: 22px; padding: 0 0 9pt 32px; }
  .jr-flow li::before { width: 22px; height: 22px; font-size: 9pt; }
  .jr-flow li::after { left: 10px; top: 22px; }
  .jr-golink { padding: 8pt 10pt; margin-top: 8pt; }
}
