/* STASTUC v2.0.1 — User Guide UI audit / responsive safety layer */
.guide-page,
.guide-page *,
.guide-page *::before,
.guide-page *::after{box-sizing:border-box}
.guide-page{padding-bottom:42px;min-width:0;overflow:visible}
#userGuideRoot,.guide-shell,.guide-doc,.guide-section,.guide-body{min-width:0;max-width:100%}

.guide-shell{display:grid;grid-template-columns:minmax(220px,260px) minmax(0,1fr);gap:18px;align-items:start;width:100%}
.guide-rail{position:sticky;top:82px;max-height:calc(100vh - 100px);min-width:0;overflow:auto;padding:14px;border:1px solid color-mix(in srgb,var(--line,#2f6387) 85%,#fff 15%);border-radius:10px;background:color-mix(in srgb,var(--card,#0d2740) 96%,#0b5f98 4%);box-shadow:0 8px 22px rgba(0,0,0,.12)}
.guide-rail::-webkit-scrollbar{width:5px;height:5px}.guide-rail::-webkit-scrollbar-thumb{background:#397fae;border-radius:6px}
.guide-rail strong{display:block;font-size:12px;letter-spacing:.12em;color:#7fc7f5;margin:2px 4px 10px}
.guide-search{display:block;width:100%;min-width:0;box-sizing:border-box;border:1px solid #356f98;border-radius:7px;background:rgba(4,29,48,.55);color:inherit;padding:9px 10px;margin-bottom:10px;outline:none}
.guide-search:focus{border-color:#66bdf0;box-shadow:0 0 0 2px rgba(61,167,227,.18)}
.guide-nav{min-width:0}.guide-nav a{display:block;max-width:100%;overflow-wrap:anywhere;color:inherit;text-decoration:none;padding:8px 9px;border-left:2px solid transparent;border-radius:5px;font-size:12.5px;line-height:1.35}
.guide-nav a:hover{background:rgba(39,142,202,.13);border-left-color:#46a7dd}
.guide-doc{width:100%}

.guide-cover{position:relative;isolation:isolate;overflow:hidden;border:1px solid #356f98;border-radius:12px;background:linear-gradient(135deg,rgba(10,72,112,.97),rgba(10,38,63,.97));padding:28px 30px;margin-bottom:16px;box-shadow:0 12px 30px rgba(0,0,0,.14)}
.guide-cover:after{content:"";position:absolute;z-index:-1;right:-70px;top:-100px;width:280px;height:280px;border:42px solid rgba(94,190,242,.09);border-radius:50%}
.guide-cover .guide-kicker{font-size:11px;letter-spacing:.18em;color:#8ed4fb;font-weight:800;overflow-wrap:anywhere}
.guide-cover h2{font-size:clamp(25px,3vw,32px);line-height:1.12;margin:8px 0;color:#fff;overflow-wrap:anywhere}
.guide-cover p{max-width:840px;margin:0;color:#d8ebf7;line-height:1.65;overflow-wrap:anywhere}
.guide-author{display:flex;flex-wrap:wrap;gap:8px 20px;margin-top:20px;padding-top:16px;border-top:1px solid rgba(255,255,255,.18);font-size:12.5px;color:#dcecf6}
.guide-author span{min-width:0;overflow-wrap:anywhere}.guide-author b{color:#fff}.guide-version{display:inline-flex;align-items:center;gap:7px;border:1px solid rgba(143,213,250,.38);border-radius:999px;padding:4px 9px}.guide-version:before{content:"";flex:0 0 auto;width:7px;height:7px;border-radius:50%;background:#5bd09e}

.guide-callout{max-width:100%;min-width:0;overflow-wrap:anywhere;border:1px solid #3f7da4;border-left:4px solid #37a0dc;background:rgba(34,118,168,.09);border-radius:7px;padding:13px 15px;line-height:1.6;margin:12px 0}
.guide-callout.warn{border-left-color:#e4a64c;background:rgba(222,153,54,.08)}.guide-callout.good{border-left-color:#43b982;background:rgba(58,172,117,.08)}
.guide-section{scroll-margin-top:90px;border:1px solid color-mix(in srgb,var(--line,#315d7b) 92%,#fff 8%);border-radius:10px;background:var(--card,#0d2740);margin:0 0 14px;overflow:clip}
.guide-section.is-filtered{display:none}.guide-section-head{min-width:0;padding:15px 18px;border-bottom:1px solid color-mix(in srgb,var(--line,#315d7b) 85%,transparent 15%);background:linear-gradient(90deg,rgba(16,91,137,.16),transparent)}
.guide-section-head span{font-size:10.5px;letter-spacing:.14em;font-weight:800;color:#6fc2f0}.guide-section-head h3{min-width:0;margin:4px 0 0;font-size:19px;line-height:1.3;overflow-wrap:anywhere}
.guide-body{padding:17px 18px 20px;line-height:1.65;font-size:13.5px;overflow:visible}
.guide-body h4{font-size:14px;margin:19px 0 6px;color:#79c9f2;overflow-wrap:anywhere}.guide-body h4:first-child{margin-top:0}.guide-body p{margin:7px 0 11px;overflow-wrap:anywhere}.guide-body ul,.guide-body ol{margin:6px 0 12px;padding-left:22px;max-width:100%}.guide-body li{margin:4px 0;overflow-wrap:anywhere}

/* Equations: never overlap text/card; long equations scroll independently. */
.guide-eq{display:block;width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;margin:10px 0;padding:12px 14px;border:1px solid #315f7e;border-radius:7px;background:rgba(2,20,34,.42);font-family:"Times New Roman",serif;font-size:17px;line-height:1.55;letter-spacing:.015em;text-align:center;color:#eef9ff;white-space:normal}
.guide-eq>small{display:block;min-width:0;font-family:Arial,sans-serif;font-size:11px;line-height:1.5;color:#98c7df;margin-top:6px;white-space:normal;overflow-wrap:anywhere}
.guide-eq sub,.guide-eq sup{line-height:0}

.guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0;max-width:100%}
.guide-mini{min-width:0;overflow-wrap:anywhere;border:1px solid #315f7e;border-radius:7px;padding:12px 13px;background:rgba(16,89,132,.06)}.guide-mini b{display:block;margin-bottom:4px;color:#89d3fa}

/* Tables: structural wrapper prevents collision with cards/neighbor columns. */
.guide-table-scroll{position:relative;display:block;width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;margin:10px 0 14px;border:1px solid #315f7e;border-radius:8px;background:rgba(4,27,44,.18);scrollbar-width:thin;scrollbar-color:#4b8bb3 rgba(2,20,34,.35)}
.guide-table-scroll::-webkit-scrollbar{height:8px}.guide-table-scroll::-webkit-scrollbar-track{background:rgba(2,20,34,.35)}.guide-table-scroll::-webkit-scrollbar-thumb{background:#4b8bb3;border-radius:10px}
.guide-table-scroll:focus{outline:2px solid rgba(102,189,240,.38);outline-offset:2px}
.guide-table{width:100%;min-width:640px;border-collapse:separate;border-spacing:0;margin:0;font-size:12.5px;line-height:1.5;table-layout:auto}
.guide-table th,.guide-table td{min-width:0;max-width:520px;border:0;border-right:1px solid #315f7e;border-bottom:1px solid #315f7e;padding:9px 10px;vertical-align:top;text-align:left;white-space:normal;overflow-wrap:anywhere;word-break:normal;hyphens:auto}
.guide-table th:last-child,.guide-table td:last-child{border-right:0}.guide-table tbody tr:last-child td{border-bottom:0}.guide-table thead tr:first-child th{border-top:0}
.guide-table th{position:sticky;top:0;z-index:1;background:color-mix(in srgb,var(--card,#0d2740) 80%,#176596 20%);color:#8bd3f7;font-weight:800;vertical-align:middle}
.guide-table tbody tr:nth-child(even) td{background:rgba(25,103,151,.045)}
.guide-table tbody tr:hover td{background:rgba(46,135,186,.08)}
.guide-table td:first-child,.guide-table th:first-child{min-width:128px}
.guide-table td b{white-space:normal}

.guide-flow{display:flex;gap:6px;flex-wrap:wrap;max-width:100%;margin:12px 0}.guide-flow span{min-width:0;max-width:100%;overflow-wrap:anywhere;border:1px solid #36729a;border-radius:6px;padding:7px 9px;background:rgba(25,111,164,.09);font-size:12px;font-weight:700}.guide-flow i{font-style:normal;align-self:center;flex:0 0 auto;color:#73bfe9}
.guide-ref{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;min-width:0;border-bottom:1px solid rgba(70,120,150,.35);padding:11px 0}.guide-ref:last-child{border-bottom:0}.guide-ref>div{min-width:0}.guide-ref-num{width:27px;height:27px;display:grid;place-items:center;border:1px solid #3f7fa8;border-radius:6px;color:#7bc8f1;font-weight:800;font-size:11px}.guide-ref b{display:block;max-width:100%;font-size:12.8px;line-height:1.45;overflow-wrap:anywhere}.guide-ref p{margin:2px 0;font-size:12px;line-height:1.5;color:var(--muted,#9db5c7);overflow-wrap:anywhere}.guide-ref a{display:block;max-width:100%;margin-top:3px;color:#6dc6f7;text-decoration:none;font-size:11.5px;overflow-wrap:anywhere;word-break:break-word}.guide-ref a:hover{text-decoration:underline}
.guide-citation{max-width:100%;min-width:0;overflow-wrap:anywhere;border:1px dashed #467b9c;border-radius:7px;padding:12px 14px;background:rgba(17,90,132,.07);font-size:12.5px}.guide-empty-search{display:none;padding:25px;text-align:center;border:1px dashed #3d7395;border-radius:9px;color:#9ec4da}.guide-empty-search.show{display:block}

@media(max-width:1180px){
  .guide-shell{grid-template-columns:minmax(200px,230px) minmax(0,1fr);gap:14px}
  .guide-body{padding-left:15px;padding-right:15px}
  .guide-table{min-width:700px}
}
@media(max-width:1050px){
  .guide-shell{grid-template-columns:1fr}
  .guide-rail{position:relative;top:auto;max-height:none;overflow:hidden}
  .guide-nav{display:flex;gap:4px;overflow-x:auto;overflow-y:hidden;padding-bottom:5px;scrollbar-width:thin}
  .guide-nav a{flex:0 0 auto;white-space:nowrap;border-left:0;border-bottom:2px solid transparent}
  .guide-nav a:hover{border-bottom-color:#46a7dd}
  .guide-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  .guide-cover{padding:23px 20px}
  .guide-cover:after{right:-120px;top:-120px}
  .guide-section-head{padding:14px 15px}.guide-body{padding:15px}
  .guide-table-scroll{margin-left:0;margin-right:0}
  .guide-table{min-width:720px;font-size:11.75px}
  .guide-table th,.guide-table td{padding:8px 9px;max-width:320px}
  .guide-eq{font-size:15px;text-align:left}
  .guide-ref{grid-template-columns:30px minmax(0,1fr)}
}
@media(max-width:520px){
  .guide-page{padding-bottom:28px}
  .guide-cover{padding:20px 16px}.guide-cover h2{font-size:24px}.guide-author{display:grid;grid-template-columns:1fr;gap:5px;margin-top:15px;padding-top:13px}
  .guide-rail{padding:11px}.guide-nav a{font-size:11.5px;padding:7px 8px}
  .guide-section{border-radius:8px}.guide-section-head{padding:13px}.guide-section-head h3{font-size:17px}.guide-body{padding:13px;font-size:13px}
  .guide-body ul,.guide-body ol{padding-left:19px}
  .guide-callout{padding:11px 12px}
  .guide-grid{gap:8px}.guide-mini{padding:10px 11px}
  .guide-table{min-width:680px;font-size:11.25px}
  .guide-eq{padding:10px 11px;font-size:14px;line-height:1.5}
  .guide-flow{gap:5px}.guide-flow span{font-size:11.5px;padding:6px 8px}
  .guide-ref b{font-size:12px}.guide-ref p{font-size:11.5px}.guide-ref a{font-size:11px}
}
@media print{
  .guide-shell{display:block}.guide-rail{display:none}.guide-section{break-inside:avoid;overflow:visible}.guide-table-scroll{overflow:visible;border:0}.guide-table{min-width:0;font-size:10px}.guide-table th{position:static}.guide-eq{overflow:visible}.guide-cover{break-inside:avoid}
}
