/* EG FAQ의 반응형 검색 화면과 상세 문서 및 인쇄 레이아웃을 정의한다. */
:root { color-scheme: light; --ink: #182b47; --muted: #5f6e83; --blue: #2563eb; --line: #e7ecf3; --radius: 18px; font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "맑은 고딕", sans-serif; color: var(--ink); background: #fff; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button, a { touch-action: manipulation; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex="-1"]:focus-visible { outline: 3px solid #90b8ff; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -70px; left: 20px; z-index: 10; padding: 12px 18px; background: var(--ink); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1264px; height: 86px; padding: 0 32px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 24px; letter-spacing: -.9px; font-weight: 800; text-decoration: none; }
.brand-light { font-weight: 500; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 39px; background: var(--blue); color: #fff; border-radius: 11px; }
.brand-mark svg { width: 28px; height: 28px; }
.header-caption { display: flex; align-items: center; gap: 13px; color: #68768a; font-size: 13px; }
.version { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; color: #8590a0; font-size: 11px; }
.page-shell { max-width: 1264px; margin: 0 auto; padding: 0 32px 48px; }
.hero { text-align: center; padding: 70px 0 38px; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; }
.small-line { width: 17px; height: 2px; background: currentColor; }
h1 { margin: 17px 0 15px; font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -1.9px; line-height: 1.35; font-weight: 750; }
.hero-description { margin: 0; color: var(--muted); font-size: 15px; letter-spacing: -.35px; }
.search-form { max-width: 760px; margin: 32px auto 0; border: 1px solid #cddbf2; box-shadow: 0 7px 25px #1c55a00c; border-radius: 16px; padding: 8px; display: flex; align-items: center; gap: 12px; background: #fff; }
.search-form:focus-within { border-color: #6295ed; box-shadow: 0 0 0 3px #2563eb0c, 0 7px 25px #1c55a00c; }
.search-icon { width: 23px; height: 23px; margin-left: 13px; flex-shrink: 0; color: #8b9bb1; }
.search-form input { min-width: 0; width: 100%; border: 0; outline: none; padding: 13px 0; font-size: 15px; background: transparent; color: var(--ink); }
.search-form input::placeholder { color: var(--muted); }
.search-form input:focus-visible { outline: none; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-button { padding: 14px 29px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; white-space: nowrap; font-weight: 650; font-size: 14px; min-height: 48px; }
.search-button:hover { background: #1c51cb; }
.clear-button { border: 0; color: #71809a; border-radius: 50%; background: #f3f6fa; font-size: 23px; line-height: 1; min-width: 44px; min-height: 44px; }
.search-help { font-size: 12px; color: var(--muted); margin: 15px 0 0; }
.manual-link { margin-top: 14px; text-decoration: none; }
.recent-searches { max-width: 760px; margin: 20px auto 0; display: flex; gap: 12px; align-items: center; text-align: left; }
.recent-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.chip-list { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.chip { display: flex; align-items: center; gap: 20px; padding: 9px 14px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: #53617a; font-size: 13px; min-height: 44px; max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.chip:hover { color: var(--blue); border-color: #abc5fa; background: #f7faff; }
.chip span { color: #8b9bb1; }
.recent-searches .chip { padding: 7px 12px; background: #f4f7fb; border-color: transparent; }
.text-button { border: 0; background: transparent; color: #677991; padding: 10px 4px; min-height: 44px; font-size: 12px; white-space: nowrap; }
.text-button:hover { color: var(--blue); }
.recent-searches > .text-button { margin-left: auto; }
.welcome { padding: 44px 24px 42px; margin: 0 auto 22px; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(155deg, #f8faff, #fcfdff 65%); text-align: center; }
.welcome-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 23px; border: 1px solid #e0e9fb; border-radius: 22px; background: #eef4ff; color: #5c86d3; }
.welcome-icon svg { width: 41px; height: 41px; }
.welcome h2 { margin: 0 0 12px; font-size: 21px; font-weight: 650; letter-spacing: -.6px; }
.welcome > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.suggestions { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 31px; }
.suggestions > span { color: var(--muted); font-size: 12px; }
.suggestions .chip-list { justify-content: center; }
.site-footer { max-width: 1200px; border-top: 1px solid var(--line); margin: 0 auto; padding: 24px 0 30px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.site-footer strong { font-weight: 650; color: #6b7a91; }
.footer-divider { padding: 0 7px; }
.has-results .hero { padding-top: 34px; padding-bottom: 28px; }
.has-results h1 { font-size: 30px; margin: 10px 0; letter-spacing: -1px; }
.has-results .search-form { margin-top: 23px; }
.has-results .search-help { display: none; }
.workspace { display: grid; grid-template-columns: 2fr 3fr; gap: 22px; min-width: 0; }
.results-panel, .detail-panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.results-panel { background: #f8fafd; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; border-bottom: 1px solid var(--line); background: #fff; min-height: 69px; }
.panel-heading h2 { font-size: 15px; font-weight: 700; margin: 0; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.count-badge { background: #edf3ff; color: var(--blue); font-size: 12px; border-radius: 6px; padding: 4px 7px; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results-scroll { height: clamp(440px, calc(100dvh - 430px), 680px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 12px; }
.result-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.result-card { display: block; text-align: left; width: 100%; padding: 20px 19px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); position: relative; }
.result-card:hover { border-color: #acc7f5; }
.result-card[aria-current="true"] { background: #f0f5ff; border-color: #7ba6f8; box-shadow: 0 2px 6px #2563eb08; }
.result-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; letter-spacing: .3px; margin-bottom: 9px; }
.result-card[aria-current="true"] .result-meta { color: #4479d9; }
.result-title { display: block; font-size: 14px; font-weight: 650; line-height: 1.65; letter-spacing: -.25px; overflow-wrap: anywhere; }
.result-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.8; color: var(--muted); margin-top: 9px; overflow-wrap: anywhere; }
mark { background: #e5eeff; color: #2257b9; border-radius: 3px; padding: 0 1px; }
.detail-placeholder { min-height: 510px; height: 100%; display: flex; justify-content: center; align-items: center; flex-direction: column; padding: 28px; text-align: center; }
.placeholder-symbol { display: grid; place-items: center; width: 55px; height: 55px; background: #f2f6fb; color: #92a5c2; border-radius: 16px; font-size: 27px; margin-bottom: 16px; }
.detail-placeholder h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; }
.detail-placeholder p { font-size: 13px; color: var(--muted); line-height: 1.9; margin: 0; }
.detail-toolbar { min-height: 69px; padding: 10px 19px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.document-number { color: var(--muted); font-size: 11px; }
.detail-actions { display: flex; gap: 5px; margin-left: auto; }
.toolbar-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; padding: 10px 11px; color: #5f7088; background: #fff; min-height: 44px; font-size: 12px; white-space: nowrap; }
.toolbar-button:hover { background: #f6f9ff; color: var(--blue); }
#back-to-list { border-color: transparent; }
.detail-scroll { height: clamp(440px, calc(100dvh - 430px), 680px); overflow: auto; scrollbar-width: thin; overscroll-behavior: contain; padding: 28px; }
.article-label { color: var(--muted); font-size: 10px; letter-spacing: .5px; margin: 3px 0 15px; }
.article-label span { padding: 0 7px; color: #c7d1df; }
#detail-title { font-size: 22px; letter-spacing: -.5px; line-height: 1.6; margin: 0 0 25px; padding-bottom: 25px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.detail-content { font-size: 14px; color: #43536a; line-height: 1.9; overflow-wrap: anywhere; }
.detail-content p { margin: 0 0 15px; }
.detail-content img { max-width: 100%; height: auto; vertical-align: middle; border-radius: 5px; }
.detail-content img.image-failed { display: block; min-height: 48px; padding: 10px; border: 1px dashed #e1bfb9; color: #946553; }
.detail-content table { border-collapse: collapse; max-width: 100%; width: 100%; table-layout: fixed; margin: 18px 0; }
.detail-content td, .detail-content th { border: 1px solid #d5dce8; padding: 9px; overflow-wrap: anywhere; }
.detail-content th { background: #f2f6fb; }
.detail-content pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-content ul, .detail-content ol { padding-left: 25px; }
.detail-content a[href] { color: #2563eb; text-decoration: underline; text-underline-offset: 3px; }
.detail-content .text-warning { color: #b33030; }
.detail-content .text-accent { color: #1e5cb7; }
.article-footer { border-top: 1px solid var(--line); padding: 18px 0 0; margin-top: 35px; display: flex; justify-content: space-between; align-items: center; gap: 15px; color: var(--muted); font-size: 11px; }
.panel-message { color: #7c899e; font-size: 13px; text-align: center; line-height: 1.9; padding: 48px 15px; margin: 0; white-space: pre-line; }
.panel-message.error { color: #a0433a; }
.panel-message.loading::before { content: ""; display: block; width: 22px; height: 22px; margin: 0 auto 16px; border: 2px solid #e4ebf6; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { font-size: 12px; color: #8c6424; background: #fff8e9; padding: 12px 18px; margin: 0; line-height: 1.8; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 14px 22px; border-radius: 12px; color: #fff; background: #1d304b; box-shadow: 0 8px 30px #14254022; font-size: 13px; z-index: 5; }
.copy-fallback { margin-top: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.copy-fallback input { flex: 1; min-width: 150px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; }
@media (max-width: 1250px) { .site-footer { margin: 0 32px; } }
@media (max-width: 1023px) {
  .workspace { grid-template-columns: 1fr; gap: 20px; }
  .results-scroll { height: auto; max-height: 460px; }
  .detail-scroll { height: auto; max-height: 680px; }
  .detail-placeholder { min-height: 240px; }
  .hero { padding-top: 55px; }
}
@media (max-width: 767px) {
  .header-inner { height: 72px; padding: 0 20px; }
  .brand { font-size: 22px; }
  .brand-mark { width: 33px; height: 35px; border-radius: 9px; }
  .header-caption { font-size: 11px; }
  .version { display: none; }
  .page-shell { padding: 0 18px 28px; }
  .hero { padding: 45px 0 28px; }
  h1 { font-size: 29px; margin: 15px 0 12px; letter-spacing: -1.4px; }
  .hero-description { font-size: 12px; }
  .search-form { margin-top: 26px; gap: 5px; padding: 6px; border-radius: 13px; }
  .search-icon { width: 19px; height: 19px; margin-left: 7px; }
  .search-form input { font-size: 16px; padding: 13px 0; }
  .search-form input::placeholder { font-size: 12px; }
  .search-button { padding: 13px 16px; min-height: 46px; font-size: 13px; border-radius: 8px; }
  .clear-button { min-width: 44px; min-height: 44px; background: transparent; }
  .search-help { font-size: 11px; line-height: 1.7; }
  .recent-searches { flex-wrap: wrap; gap: 7px 10px; margin-top: 15px; }
  .recent-searches .chip-list { order: 3; width: 100%; }
  .recent-searches > .text-button { margin-left: auto; }
  .welcome { padding: 34px 20px; border-radius: 17px; }
  .welcome h2 { font-size: 18px; }
  .welcome > p { font-size: 12px; }
  .suggestions { gap: 14px; margin-top: 25px; }
  .suggestions > span { width: 100%; font-size: 11px; }
  .chip { font-size: 12px; padding: 9px 12px; gap: 13px; }
  .site-footer { margin: 0 18px; padding: 22px 0 26px; flex-direction: column; align-items: center; gap: 10px; font-size: 10px; }
  .has-results .hero { padding: 28px 0 22px; }
  .has-results h1 { font-size: 25px; }
  .has-results .eyebrow { display: none; }
  .has-results .search-form { margin-top: 21px; }
  .workspace { display: block; }
  .results-scroll { max-height: none; overflow: visible; padding: 10px; }
  .result-card { padding: 17px; }
  .detail-panel { display: none; }
  .detail-open .results-panel { display: none; }
  .detail-open .detail-panel { display: block; }
  .detail-open .hero-description, .detail-open .recent-searches { display: none; }
  .detail-open .hero { padding-top: 20px; }
  .detail-open h1 { font-size: 22px; }
  .detail-scroll { max-height: none; overflow: visible; padding: 22px 18px; }
  .detail-toolbar { padding: 9px 10px; gap: 1px; }
  .toolbar-button { padding: 10px 8px; font-size: 11px; }
  .document-number { font-size: 10px; }
  .detail-actions { gap: 3px; }
  #detail-title { font-size: 20px; }
  .article-footer { align-items: flex-start; flex-direction: column; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; } }
@media print {
  @page { margin: 16mm; }
  body { color: #000; }
  .site-header, .hero, .welcome, .results-panel, .detail-toolbar, .site-footer, .toast, .copy-fallback, .skip-link, .article-footer, #detail-message { display: none !important; }
  .page-shell { max-width: none; padding: 0; }
  .workspace, .detail-panel, #detail-view, #detail-article { display: block !important; }
  .detail-panel { border: 0; border-radius: 0; overflow: visible; }
  .detail-scroll { height: auto; max-height: none; overflow: visible; padding: 0; }
  .detail-content { font-size: 10pt; color: #000; }
  .detail-content img { break-inside: avoid; max-height: 230mm; object-fit: contain; }
  .detail-content tr { break-inside: avoid; }
  #detail-title { font-size: 18pt; }
  mark { color: inherit; background: transparent; }
}
