/* Shared controls outside the reference's individual documents. */
body.reference{--accent:#3b3486;--green:#3b3486;--soft:#f4f2fb;--paper:#fff;--panel:#fff;--line:#dfe3ee;--muted:#5b6475;--ink:#1b1f2a;--bg:#f4f5fa;background:var(--bg);color:var(--ink);font-family:"Pretendard","Noto Sans KR","Malgun Gothic",system-ui,sans-serif}
body.reference[data-theme="dark"]{--bg:#0f1220;--panel:#171b2c;--paper:#171b2c;--ink:#e8eaf3;--muted:#a7aec4;--line:#2a3048;--soft:#242a42;--accent:#a99ff5;--green:#7066bd}
body.reference a{color:inherit}body.reference .r-link{padding:0;background:none;border:0;color:var(--accent);font:inherit;text-decoration:underline;cursor:pointer;font-weight:700}
body.reference .r-extra-links{display:block;margin-top:14px;font-size:12.5px;line-height:2}
body.ref-home footer a{color:var(--accent)}body.ref-home footer .r-extra-links a{font-weight:500}
body.reference .r-hub{background:linear-gradient(90deg,#2b2766,#3b3486 50%,#0f6e66);color:#fff;padding:10px 16px;display:flex;align-items:center;gap:14px;flex-wrap:wrap;line-height:1.5}
body.reference .r-hub h1{font-size:17px;margin:0;white-space:nowrap;font-weight:700}
body.reference .r-hub nav{display:flex;gap:6px;flex-wrap:wrap}
body.reference .r-hub nav a{font:inherit;font-size:14.5px;font-weight:700;border:1px solid #ffffff73;background:#ffffff14;color:#fff;padding:6px 14px;border-radius:999px;display:flex;gap:7px;align-items:center}
body.reference .r-hub nav a small{font-weight:600;opacity:.8;font-size:11.5px}
body.reference .r-hub nav a.r-on{background:#fff;color:#3b3486;border-color:#fff}
body.reference .r-blurb{font-size:13px;opacity:.9;flex:1;min-width:180px}
body.reference .r-hub-links{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:13px}
body.reference .r-hub-links a,body.reference .r-hub-links button{color:#fff;font:inherit;white-space:nowrap}
body.ref-search .r-tree button{background:none;border:0;width:100%;text-align:left;color:inherit}
body.ref-search .r-document-preview{width:100%;height:100%;background:#fff;color:#202332;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:30px 14px 12px;text-align:center;position:relative;border:14px solid #fff;box-shadow:inset 0 0 0 1px #dfe3ee;gap:9px}
body.ref-search .r-document-preview div{font-size:9px;font-weight:600;opacity:.7}
body.ref-search .r-document-preview b{font-size:27px;letter-spacing:.5em;margin-left:.5em}
body.ref-search .r-document-preview span{font-size:14px;border:1px solid #d6dbe8;border-radius:4px;padding:5px 10px}
body.ref-search .r-document-preview small{font-size:8px;color:#8a93a6}
body.ref-search .r-search input{font-family:inherit}
body.ref-search .r-tabs{width:100%}
body.ref-search .r-legend span{cursor:default}
body.ref-sheets .r-sheet-links{text-align:right;font-size:13.5px}
body.ref-sheets .r-sheet-links a{color:white;text-decoration:underline}
body.ref-sheets .r-sheet-footer .r-foot{font-size:12.5px;text-align:center;padding:24px 0;color:var(--muted)}
body.ref-sheets .r-sheet-footer a{color:var(--accent);font-weight:700}
body.ref-sheet .r-topbar{height:auto;display:block;padding:0;background:none;border:0;gap:0}
body.ref-sheet .r-tb1 .r-in{max-width:1160px;height:auto;min-height:54px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}
body.ref-sheet .r-tb1 .r-acts{flex-wrap:wrap;margin-left:auto;display:flex;gap:6px}
body.ref-sheet .r-tb1 .r-tbtn{background:#ffffff26;border:1px solid #ffffff59;color:#fff;border-radius:7px;padding:6px 10px;font-size:13.5px;font-weight:700;display:inline-flex;align-items:center}
body.ref-sheet .r-tb2{background:var(--panel);border-bottom:1px solid var(--line)}
body.ref-sheet .r-tb2 .r-in{max-width:1160px;min-height:48px;flex-wrap:wrap;padding-top:7px;padding-bottom:7px}
body.ref-sheet .r-switch{display:inline-flex;gap:7px;align-items:center;font-weight:600;font-size:13px}
body.ref-sheet .r-switch input{accent-color:var(--accent)}
body.ref-sheet .r-text-size{display:inline-flex;gap:0;align-items:center;color:var(--muted);font-size:12px}
body.ref-sheet .r-text-size button{border:1px solid var(--line);background:var(--soft);padding:4px 10px;color:var(--accent);font-weight:700}
body.ref-sheet .r-text-size output{border-block:1px solid var(--line);padding:4px 10px;font-weight:700;color:var(--accent)}
body.ref-sheet .r-tb2 .r-tbtn{border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:6px;padding:5px 9px;font-size:12px}
body.ref-sheet .r-save-label{color:var(--muted);font-size:11px;margin-left:auto}
body.ref-sheet .r-page{display:flex;flex-direction:column}
body.ref-sheet .r-source-question{margin-top:5mm;font-size:calc(10.5pt*var(--fs));line-height:1.8}
body.ref-sheet .r-official-button{display:inline-block;padding:9px 14px;background:var(--accent);color:white;border-radius:5px;font-weight:700}
body.ref-sheet .r-source-post{display:inline-block;margin-left:12px;color:var(--accent);text-decoration:underline;font-size:12px}
body.ref-sheet .r-original-note{font-size:11px;color:var(--muted);margin:10px 0}
body.ref-sheet .r-note-toolbar{display:flex;align-items:center;gap:10px;margin:14px 0 8px;font-size:12px}
body.ref-sheet .r-note-toolbar input{border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:4px;width:58px;padding:5px}
body.ref-sheet .r-work{min-height:125mm;display:flex;flex-direction:column;flex:0 0 auto}
body.ref-sheet .r-work textarea{background:transparent;color:var(--ink);border:0;padding:35px 13px 15px;width:100%;min-height:125mm;resize:vertical;outline-offset:3px;font:inherit;font-size:calc(10.5pt*var(--fs));line-height:1.8}
body.ref-sheet .r-answer textarea{border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);font:inherit;padding:7px;min-height:70px;flex:1;resize:vertical}
body.ref-sheet .r-page footer a{color:var(--accent);text-decoration:underline}
body.ref-sheet .r-idbox{margin-top:8px;flex-wrap:wrap}
body.ref-sheet .r-work .r-lbl{font-size:calc(9pt*var(--fs))}
body.ref-utility .r-utility-header{background:linear-gradient(100deg,#2c2670,#3b3486 40%,#0f6e66 75%,#9a4d0b);color:white;padding:22px 16px}
body.ref-utility .r-utility-header>div{max-width:1100px;margin:auto}
body.ref-utility .r-utility-header>div>a{font-size:13.5px;text-decoration:underline}
body.ref-utility .r-utility-header h1{font-size:26px;margin:12px 0 8px}
body.ref-utility .r-utility-header nav{font-size:13px;line-height:2}
body.ref-utility .r-utility-header .r-link{color:white}
body.ref-utility .page{max-width:1100px;padding-top:25px}
body.ref-utility .eyebrow{display:none}
body.reference dialog{font-family:inherit;max-width:760px}
body.reference .r-preview-close{position:absolute;right:12px;top:10px;font-size:25px;color:var(--muted)}
body.reference .r-preview-document{padding:34px;border:1px solid var(--line);border-left:6px solid var(--c);margin-top:15px;background:var(--panel)}
body.reference .r-preview-document span{font-size:12px;color:var(--muted)}
body.reference #toast{background:#3b3486}
@media(max-width:980px){body.reference .r-hub .r-blurb{display:none}body.reference .r-hub h1{width:100%}}
@media(max-width:560px){body.reference .r-hub{padding:10px 12px;gap:9px}body.reference .r-hub h1{font-size:15px;white-space:normal}body.reference .r-hub nav a{font-size:12.5px;padding:6px 10px}body.reference .r-hub-links{font-size:11px;gap:9px}body.ref-search .r-document-preview{border:8px solid white;gap:6px;padding:24px 7px 8px}body.ref-search .r-document-preview div{font-size:7px}body.ref-search .r-document-preview b{font-size:20px}body.ref-search .r-document-preview span{font-size:11px;padding:3px 6px}body.ref-search .r-document-preview small{display:none}body.ref-search .r-acts a{font-size:11px}body.ref-search .r-acts .r-pv{flex-basis:29px}body.ref-sheet .r-tb1 .r-code{font-size:10px}body.ref-sheet .r-tb1 .r-ttl{font-size:13px}body.ref-sheet .r-tb1 .r-acts{margin:0;width:100%}body.ref-sheet .r-tb1 .r-tbtn{font-size:11px;padding:6px 8px}body.ref-sheet .r-tb2 .r-in{gap:8px}body.ref-sheet .r-save-label{width:100%;margin:0}body.ref-sheet .r-page{padding:16px;min-height:0}body.ref-sheet .r-idbox{font-size:11px}body.ref-sheet .r-answer{align-items:flex-start}body.ref-sheet .r-source-post{margin:10px 0 0;display:block}body.ref-sheet .r-work,body.ref-sheet .r-work textarea{min-height:110mm}body.ref-utility .r-utility-header h1{font-size:22px}}
@media print{body.reference .r-hub,body.ref-sheet .r-topbar,body.ref-sheet .r-note-toolbar,body.ref-sheet .r-official-button,body.ref-sheet .r-source-post,body.ref-sheet .r-original-note{display:none!important}body.ref-sheet{background:white!important}body.ref-sheet .r-page{width:100%;padding:8mm 12mm;margin:0;box-shadow:none;min-height:270mm;height:auto}body.ref-sheet .r-orig{display:block!important;font-size:8pt;overflow-wrap:anywhere}body.ref-sheet .r-work textarea{resize:none;min-height:110mm}body.ref-sheet .r-work{min-height:110mm}body.ref-sheet .r-page footer{display:none}body.ref-sheet #print-notes{display:none!important}body.ref-sheet .r-answer{break-inside:avoid}}

body.ref-home{--bg:#f4f5f9}body.ref-sheet{--bg:#eef0f4}
