.lri-theory-modal-open{overflow:hidden}.lri-theory-modal-root{display:none;position:fixed;inset:0;z-index:2147483010}.lri-theory-modal-root.open{display:block}.lri-theory-backdrop{position:absolute;inset:0;background:rgba(7,18,34,.6);backdrop-filter:blur(8px)}.lri-theory-modal{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(980px,calc(100vw - 36px));height:min(86vh,860px);background:#f3f5f2;border-radius:24px;overflow:hidden;box-shadow:0 30px 90px rgba(0,0,0,.3)}.lri-theory-close{position:absolute;right:14px;top:12px;z-index:3;width:38px;height:38px;border-radius:50%;border:1px solid #cbd2c7;background:#fff;font-size:25px;color:#23382b;cursor:pointer}.lri-theory-scroll{height:100%;overflow:auto;padding:20px}.lri-theory-loading{display:grid;place-items:center;height:70vh;color:#647166}.lri-theory-sheet{background:#fff;border:1px solid #d7ddd5;border-radius:20px;overflow:hidden}.lri-theory-sheet>header{padding:28px 30px;background:#173a2a;color:#fff}.lri-theory-sheet>header>span{font-size:11px;letter-spacing:.14em;color:#a9d7bb;font-weight:900}.lri-theory-sheet>header h2{color:#fff!important;background:transparent!important;margin:8px 0 6px;font-size:clamp(27px,3vw,42px)}.lri-theory-sheet>header p{margin:0;color:#d7eadf}.lri-theory-principle,.lri-theory-explains,.lri-theory-boundary{padding:22px 28px}.lri-theory-principle>b,.lri-theory-explains>b,.lri-theory-boundary>b{color:#315a43;font-size:12px;letter-spacing:.08em}.lri-theory-principle p,.lri-theory-explains p,.lri-theory-boundary li{color:#495b50;line-height:1.65}.lri-theory-formula{margin-top:14px;padding:16px;border-radius:12px;background:#eef5f0;color:#173a2a;font:700 18px ui-monospace,SFMono-Regular,Consolas,monospace;text-align:center}.lri-theory-flow{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:0 28px}.lri-theory-flow article{background:#f6f8f5;border:1px solid #dce4dd;border-radius:14px;padding:14px}.lri-theory-flow span{display:grid;width:25px;height:25px;border-radius:50%;place-items:center;background:#dcecdf;color:#315a43;font-weight:900}.lri-theory-flow p{margin:9px 0 0;color:#425349;font-size:13px;line-height:1.5}.lri-theory-boundary{background:#fffaf1;border-top:1px solid #eee0c4}.lri-theory-sheet footer{display:flex;flex-wrap:wrap;gap:8px;padding:18px 28px 26px;border-top:1px solid #e2e7e1}.lri-theory-sheet footer a{color:#24583a;text-decoration:none;font-weight:800}.theory-evidence-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.theory-evidence-card{appearance:none;text-align:left;border:1px solid #d9e1da;border-radius:16px;background:#fff;padding:16px;cursor:pointer;min-height:176px;transition:.18s ease}.theory-evidence-card:hover{transform:translateY(-2px);box-shadow:0 10px 30px rgba(27,66,43,.08);border-color:#a9c5b1}.theory-evidence-card .theory-kind{font-size:10px;letter-spacing:.1em;color:#578067;font-weight:900}.theory-evidence-card b{display:block;margin:9px 0 7px;color:#173a2a;line-height:1.3}.theory-evidence-card p{margin:0;color:#617066;font-size:12px;line-height:1.5}.theory-evidence-card code{display:block;margin-top:12px;color:#315a43;font-size:11px;white-space:normal}.lri-signal-takeaway{margin:18px 30px 0;padding:14px 16px;border-left:4px solid #2e86d1;background:#f2f8ff;color:#173252;font-size:16px;font-weight:800;line-height:1.5}.lri-signal-meta{display:flex;flex-wrap:wrap;gap:7px;padding:14px 30px 0}.lri-signal-meta span{font-size:11px;padding:5px 8px;border-radius:999px;background:#edf3f8;color:#536b82}.lri-signal-theory{display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:0 30px 18px}.lri-signal-theory>span{font-size:11px;color:#718398}.lri-signal-theory button{border:1px solid #c9dfd0;background:#f3faf5;color:#315a43;border-radius:999px;padding:6px 9px;cursor:pointer;font-weight:800;font-size:11px}.lri-signal-authority{display:none!important}@media(max-width:900px){.theory-evidence-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.lri-theory-modal{width:calc(100vw - 10px);height:calc(100vh - 10px);border-radius:15px}.lri-theory-scroll{padding:7px}.lri-theory-sheet>header{padding:24px 18px}.lri-theory-principle,.lri-theory-explains,.lri-theory-boundary{padding:18px}.lri-theory-flow{grid-template-columns:1fr;padding:0 18px}.theory-evidence-grid{grid-template-columns:1fr}.lri-signal-takeaway{margin:14px 18px 0}.lri-signal-meta,.lri-signal-theory{padding-left:18px;padding-right:18px}}
/* v2: no inner scrollbar + compact two-column theory card */
.lri-theory-modal-root{overflow-y:auto;padding:16px 0;scrollbar-gutter:stable both-edges}.lri-theory-modal{position:relative;left:auto;top:auto;transform:none;margin:auto;width:min(1050px,calc(100vw - 30px));height:auto;max-height:none;overflow:visible;background:linear-gradient(145deg,#eef2ec,#f8faf7);border:1px solid rgba(255,255,255,.8)}.lri-theory-scroll{height:auto;overflow:visible;padding:12px}.lri-theory-sheet{border-radius:20px;box-shadow:0 18px 55px rgba(37,69,48,.12)}.lri-theory-sheet>header{padding:20px 25px 18px;background:linear-gradient(120deg,#173a2a,#24583a 62%,#39724f)}.lri-theory-sheet>header>span{font-size:10px}.lri-theory-sheet>header h2{margin:5px 0 4px;font-size:clamp(25px,2.6vw,38px);line-height:1.08}.lri-theory-sheet>header p{font-size:13px;line-height:1.4}.lri-theory-body-grid{display:grid;grid-template-columns:1.08fr .92fr;gap:10px;padding:11px;background:#f5f8f4}.lri-theory-left,.lri-theory-right{display:grid;gap:9px;align-content:start}.lri-theory-principle,.lri-theory-explains,.lri-theory-boundary{padding:13px 15px;border-radius:13px;background:#fff;border:1px solid #dde5dd}.lri-theory-principle>b,.lri-theory-explains>b,.lri-theory-boundary>b{font-size:10px}.lri-theory-principle p,.lri-theory-explains p,.lri-theory-boundary li{font-size:11px;line-height:1.42}.lri-theory-principle p,.lri-theory-explains p{margin:6px 0}.lri-theory-formula{margin-top:9px;padding:11px;border-radius:10px;font-size:15px}.lri-theory-flow{grid-template-columns:1fr;gap:6px;padding:0}.lri-theory-flow article{display:grid;grid-template-columns:24px 1fr;align-items:center;gap:8px;padding:9px 10px;border-radius:11px}.lri-theory-flow span{width:22px;height:22px;font-size:10px}.lri-theory-flow p{font-size:10.5px;margin:0;line-height:1.35}.lri-theory-boundary{background:#fffaf2;border-color:#eee1c8}.lri-theory-boundary ul{margin:6px 0 0;padding-left:17px}.lri-theory-boundary li{margin:4px 0}.lri-theory-sheet footer{padding:11px 16px 14px;gap:6px}.lri-theory-sheet footer a{font-size:11px;padding:6px 8px;border-radius:8px;background:#f1f7f2}.lri-theory-close{top:10px;right:10px;width:34px;height:34px;font-size:22px}.theory-evidence-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.theory-evidence-card{position:relative;overflow:hidden;min-height:154px;padding:15px 14px 13px;background:linear-gradient(155deg,#fff 0%,#f8fbf8 100%);border-color:#dce6df;box-shadow:0 5px 18px rgba(33,71,47,.04)}.theory-evidence-card::after{content:'';position:absolute;width:72px;height:72px;border-radius:50%;right:-26px;top:-24px;background:radial-gradient(circle,rgba(69,125,87,.14),transparent 68%)}.theory-evidence-card .theory-kind{display:inline-flex;padding:4px 7px;border-radius:999px;background:#edf6ef;color:#477259;font-size:9px}.theory-evidence-card b{font-size:13px;margin:8px 0 6px;line-height:1.3;position:relative;z-index:1}.theory-evidence-card p{font-size:10.5px;line-height:1.42;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.theory-evidence-card code{font-size:10px;margin-top:9px;padding-top:8px;border-top:1px dashed #d8e3da;color:#315a43}.theory-evidence-card:hover{transform:translateY(-3px);box-shadow:0 14px 34px rgba(27,66,43,.10)}
@media(max-width:900px){.lri-theory-modal-root{padding:5px 0}.lri-theory-modal{width:calc(100vw - 10px)}.lri-theory-scroll{padding:6px}.lri-theory-body-grid{grid-template-columns:1fr}.theory-evidence-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.theory-evidence-grid{grid-template-columns:1fr}.lri-theory-sheet>header{padding:22px 18px 16px}}

@media(min-width:901px) and (max-height:800px){
  .lri-theory-modal-root{padding:3px 0}
  .lri-theory-scroll{padding:6px}
  .lri-theory-sheet>header{padding:14px 20px 12px}
  .lri-theory-sheet>header h2{font-size:clamp(23px,2.5vw,31px);margin:3px 0 2px}
  .lri-theory-body-grid{padding:7px;gap:7px}
  .lri-theory-left,.lri-theory-right{gap:6px}
  .lri-theory-principle,.lri-theory-explains,.lri-theory-boundary{padding:9px 11px}
  .lri-theory-principle p,.lri-theory-explains p,.lri-theory-boundary li{font-size:10px;line-height:1.3}
  .lri-theory-formula{margin-top:6px;padding:8px;font-size:13px}
  .lri-theory-flow{gap:4px}
  .lri-theory-flow article{padding:6px 8px}
  .lri-theory-sheet footer{padding:7px 11px 9px}
}
.lri-theory-scroll{scrollbar-width:none}.lri-theory-scroll::-webkit-scrollbar{display:none}
@media(max-width:900px){.lri-theory-modal-root{scrollbar-width:none}.lri-theory-modal-root::-webkit-scrollbar{display:none}}

@media(max-width:1150px) and (min-width:901px){.theory-evidence-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
