/* YEHAVHA NEXUS Research Document Standard v1.0 */
:root{
  --nxs-navy-950:#071627;
  --nxs-navy-900:#081a30;
  --nxs-navy-800:#0d2948;
  --nxs-blue:#2e679d;
  --nxs-blue-soft:#eaf1f7;
  --nxs-ink:#172335;
  --nxs-muted:#5e6f82;
  --nxs-line:#dbe3eb;
  --nxs-paper:#f5f7f9;
  --nxs-white:#fff;
  --nxs-radius:12px;
  --nxs-content:850px;
}

html{scrollbar-gutter:stable;scroll-behavior:smooth}
html:has(dialog[open]),body:has(dialog[open]){overflow:hidden}
body{font-family:Pretendard,"Noto Sans KR","Apple SD Gothic Neo",system-ui,-apple-system,sans-serif;letter-spacing:-.018em;word-break:keep-all}
button,input,select,a{font-family:inherit}

/* Shared Nexus navigation language */
.nexus-link,.back-link{display:inline-flex!important;align-items:center;min-height:34px;margin-bottom:18px!important;padding:0 10px;border:1px solid rgba(155,194,231,.20);border-radius:8px;color:#b8cce0!important;background:rgba(255,255,255,.035);text-decoration:none!important;font-size:11px!important;font-weight:800!important;letter-spacing:.07em!important;line-height:1!important}
.nexus-link:hover,.back-link:hover{background:rgba(255,255,255,.07);border-color:rgba(155,194,231,.34)}

/* Main research index rhythm */
.site-header{padding:34px 0 40px}
.wrap{width:min(1160px,calc(100% - 36px))}
.site-header h1{font-size:clamp(2.55rem,5vw,4.35rem);line-height:1.04}
.site-header .lead{margin-top:17px;font-size:16px;line-height:1.78}
.method-bar,.index-section{padding:38px 0}
.browser-section{padding:44px 0 48px}
.thesis-section{padding:36px 0}
.method-head h2,.browser-head h2,.section-title h2,.thesis-box h2{font-size:clamp(1.55rem,2.6vw,2rem);line-height:1.25}
.research-row,.index-card,.thesis-box,.controls{border-radius:var(--nxs-radius)}
.research-row{padding:17px 18px;transition:background .14s ease,border-color .14s ease;transform:none!important}
.research-row:hover{transform:none!important}
.detail-button,.document-action{min-height:40px}

/* Research flow = numbered, fixed grid rather than moving arrow strip */
.method-bar .flow,.research-model .flow{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;overflow:visible!important;width:100%!important;margin-top:16px!important;padding:0!important;counter-reset:nxs-flow}
.method-bar .flow>b,.research-model .flow>b{display:none!important}
.method-bar .flow>span,.research-model .flow>span{position:relative!important;display:flex!important;align-items:center!important;min-width:0!important;min-height:66px!important;padding:23px 11px 10px!important;border-radius:10px!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:keep-all!important;line-height:1.45!important;counter-increment:nxs-flow}
.method-bar .flow>span::before,.research-model .flow>span::before{content:counter(nxs-flow,decimal-leading-zero);position:absolute;top:8px;left:10px;color:#7fa8d0;font-size:10px;font-weight:900;letter-spacing:.05em;line-height:1}

/* One dialog, one scroll container. Eliminates scrollbar/float layout shift. */
.research-dialog,.detail-dialog{width:min(960px,calc(100% - 24px))!important;height:min(92dvh,900px)!important;max-height:92dvh!important;margin:auto!important;padding:0!important;border:1px solid #cbd6e1!important;border-radius:14px!important;background:var(--nxs-white)!important;color:var(--nxs-ink)!important;box-shadow:0 30px 80px rgba(3,12,23,.32)!important;overflow:hidden!important}
.research-dialog::backdrop,.detail-dialog::backdrop{background:rgba(3,12,23,.70)!important;backdrop-filter:blur(2px)}
.dialog-shell{position:relative!important;width:100%!important;height:100%!important;margin:0!important;padding:0!important;background:var(--nxs-white)!important;overflow:hidden!important}
.research-dialog .close,.detail-dialog .close{position:absolute!important;float:none!important;top:14px!important;right:14px!important;z-index:20!important;width:38px!important;height:38px!important;margin:0!important;padding:0!important;display:grid!important;place-items:center!important;border:1px solid var(--nxs-line)!important;border-radius:9px!important;background:#f3f6f9!important;color:var(--nxs-navy-900)!important;box-shadow:none!important;font-size:20px!important;line-height:1!important;cursor:pointer!important}
.research-dialog .close:hover,.detail-dialog .close:hover{background:#eaf0f5!important}
.research-article,#detailContent{height:100%!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable;padding:32px 36px 36px!important;background:var(--nxs-white)!important;color:var(--nxs-ink)!important;scroll-behavior:smooth}

/* Document header */
.article-header{max-width:var(--nxs-content);margin:0 auto;padding:0 0 25px!important;border-bottom:1px solid var(--nxs-line)!important}
.article-kicker,.detail-dialog .section-kicker{color:var(--nxs-blue)!important;font-size:11px!important;font-weight:900!important;letter-spacing:.08em!important}
.article-header h3,.detail-title{font-family:inherit!important;margin:8px 48px 0 0!important;color:var(--nxs-ink)!important;font-size:clamp(1.65rem,3vw,2.15rem)!important;line-height:1.3!important;letter-spacing:-.035em!important}
.article-header h3 small{display:block;margin-top:6px;color:#75879a!important;font-size:.52em!important;font-weight:500!important;letter-spacing:0!important}
.article-lead{margin:14px 0 0!important;color:#4f6072!important;font-size:16px!important;line-height:1.82!important}
.detail-meta-row{display:flex;flex-wrap:wrap;gap:6px;max-width:var(--nxs-content);margin:12px auto 22px!important;padding-bottom:18px;border-bottom:1px solid var(--nxs-line)}
.detail-meta-row span{padding:5px 8px;border:1px solid var(--nxs-line);border-radius:7px;background:#f7f9fb;color:#65768a;font-size:11px}

.article-question,.forecast-warning,.article-note{max-width:var(--nxs-content);margin:16px auto 0!important;padding:14px 15px!important;border:1px solid var(--nxs-line)!important;border-radius:10px!important;background:#f7f9fb!important}
.article-question strong,.article-note strong{color:var(--nxs-blue)!important;font-size:12px!important}
.article-question p,.article-note p{margin:6px 0 0!important;color:#536579!important;font-size:14px!important;line-height:1.75!important}
.forecast-warning{border-color:#dfd1ae!important;background:#fbf8f0!important}.forecast-warning strong{color:#896c2e!important}.forecast-warning p{color:#625b4e!important}

/* Uniform section numbering and spacing */
.article-body{max-width:var(--nxs-content)!important;margin:0 auto!important}
.article-section{display:grid!important;grid-template-columns:46px minmax(0,1fr)!important;gap:14px!important;padding:25px 0!important;border-bottom:1px solid var(--nxs-line)!important;scroll-margin-top:18px}
.section-number{padding-top:2px!important;color:var(--nxs-blue)!important;font-size:11px!important;font-weight:900!important;letter-spacing:.04em!important}
.article-section-body h4{margin:0 0 11px!important;color:var(--nxs-navy-800)!important;font-size:17px!important;line-height:1.45!important}
.article-section-body p{margin:0!important;color:#34465a!important;font-size:15px!important;line-height:1.86!important}.article-section-body p+p{margin-top:13px!important}
.article-section-body ul{margin:0!important;padding-left:20px!important}.article-section-body li{color:#425469!important;font-size:14.5px!important;line-height:1.78!important}
.article-tags span,.row-tags span,.chip-grid span,.mini-chips span{border-color:var(--nxs-line)!important;color:#61768b!important;background:#f8fafc!important}
.source-list a,.source-links a{border-color:var(--nxs-line)!important;background:#f8fafc!important;color:var(--nxs-blue)!important;border-radius:8px!important}

/* Legal knowledge detail sections receive the same 01/02 document numbering by CSS. */
.detail-dialog #detailContent{counter-reset:nxs-doc-section}
.detail-dialog .detail-section{position:relative!important;max-width:var(--nxs-content)!important;margin:0 auto!important;padding:24px 0 24px 58px!important;border-top:0!important;border-bottom:1px solid var(--nxs-line)!important;counter-increment:nxs-doc-section;scroll-margin-top:18px}
.detail-dialog .detail-section::before{content:counter(nxs-doc-section,decimal-leading-zero);position:absolute;left:0;top:27px;width:42px;color:var(--nxs-blue);font-size:11px;font-weight:900;letter-spacing:.04em}
.detail-dialog .detail-section h4{margin:0 0 10px!important;color:var(--nxs-navy-800)!important;font-size:17px!important;line-height:1.45!important}
.detail-dialog .detail-section p,.detail-dialog .detail-list{color:#34465a!important;font-size:15px!important;line-height:1.82!important}

/* Copyright/footer is part of every document, not a floating afterthought. */
.document-footer{display:flex!important;justify-content:space-between!important;align-items:flex-end!important;gap:22px!important;max-width:var(--nxs-content)!important;margin:30px auto 0!important;padding:20px 0 2px!important;border-top:1px solid #bfcbd7!important}
.document-footer-copy strong{display:block!important;margin-bottom:6px!important;color:var(--nxs-navy-800)!important;font-size:13px!important}
.document-footer-copy p{margin:2px 0!important;color:#718096!important;font-size:11px!important;line-height:1.6!important}.document-footer-copy a{color:var(--nxs-blue)!important;text-decoration:none!important}
.document-actions{display:flex!important;gap:8px!important;flex-wrap:wrap!important;justify-content:flex-end!important}.document-action{padding:0 13px!important;border:1px solid var(--nxs-line)!important;border-radius:8px!important;background:#f7f9fb!important;color:var(--nxs-blue)!important;font:inherit!important;font-size:12px!important;font-weight:800!important;cursor:pointer!important}.document-action:hover{background:#edf3f8!important}.document-action.close-action{background:var(--nxs-navy-900)!important;border-color:var(--nxs-navy-900)!important;color:#fff!important}.document-action.close-action:hover{background:var(--nxs-navy-800)!important}

/* Site footer and links use the same scale. */
.site-footer,.footer-note,body>footer{font-family:inherit}
.site-footer{padding:24px 0 30px}
.footer-inner p,.footer-meta,.footer-note{font-size:11px!important;line-height:1.6!important}
.footer-top-link,.top-link{font-size:11px!important;font-weight:800!important}

@media(max-width:900px){
  .method-bar .flow,.research-model .flow{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .research-article,#detailContent{padding:28px 26px 30px!important}
}
@media(max-width:620px){
  .wrap{width:calc(100% - 20px)!important}
  .site-header{padding:24px 0 30px!important}
  .site-header h1{font-size:clamp(2.1rem,11vw,3rem)!important}
  .site-header .lead{font-size:15px!important;line-height:1.72!important}
  .method-bar,.index-section,.browser-section,.thesis-section{padding:30px 0!important}
  .method-bar .flow,.research-model .flow{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .method-bar .flow>span,.research-model .flow>span{min-height:62px!important;padding:23px 9px 9px!important;font-size:12px!important}
  .research-dialog,.detail-dialog{width:calc(100% - 12px)!important;height:94dvh!important;max-height:94dvh!important;border-radius:12px!important}
  .research-article,#detailContent{padding:26px 18px 28px!important}
  .research-dialog .close,.detail-dialog .close{top:10px!important;right:10px!important;width:36px!important;height:36px!important}
  .article-header h3,.detail-title{margin-right:42px!important;font-size:1.55rem!important}
  .article-lead{font-size:15px!important}
  .article-section{grid-template-columns:36px minmax(0,1fr)!important;gap:10px!important;padding:22px 0!important}
  .article-section-body h4,.detail-dialog .detail-section h4{font-size:16px!important}
  .article-section-body p,.detail-dialog .detail-section p,.detail-dialog .detail-list{font-size:14.5px!important;line-height:1.78!important}
  .detail-dialog .detail-section{padding:22px 0 22px 44px!important}.detail-dialog .detail-section::before{top:25px;width:34px}
  .document-footer{display:block!important;padding-top:18px!important}.document-actions{margin-top:14px!important;justify-content:stretch!important}.document-action{flex:1!important}.document-footer-copy p{font-size:10.5px!important}
}
