/* Foundation HUB — public rules workspace. Loaded only on the rules page. */
.rules-workspace{--rw-bg:#101113;--rw-panel:#17181b;--rw-line:#2b2c31;--rw-muted:#a2a3ac;--rw-red:#ed666c;max-width:1440px;margin:0 auto;color:#eeeef2}
.rules-workspace *{box-sizing:border-box}
.rules-hero{position:relative;overflow:hidden;padding:25px 36px 0;border:1px solid #373037;border-radius:20px;background:radial-gradient(ellipse at 100% 0,rgba(162,37,52,.18),transparent 58%),linear-gradient(125deg,#1d1b20,#121316 70%);box-shadow:0 20px 65px #0002}
.rules-hero:before{content:"";position:absolute;top:0;left:36px;width:76px;height:3px;background:var(--rw-red)}
.rules-hero-top{display:flex;justify-content:space-between;align-items:center;gap:16px;color:#c0b8bf;font:600 10px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.13em}
.rules-document-label{display:flex;align-items:center;gap:10px}.rules-status-dot{width:6px;height:6px;border-radius:50%;background:var(--rw-red);box-shadow:0 0 12px #ed666c55}.rules-document-id{color:#a59aa3;white-space:nowrap}
.rules-hero-content{position:relative;display:flex;justify-content:space-between;align-items:center;gap:35px;padding:39px 0 32px}
.rules-kicker{color:#c58b91;font-size:10px;letter-spacing:.16em;font-weight:700}
.rules-hero h1{font-size:clamp(36px,4.1vw,62px);line-height:1.08;letter-spacing:-.055em;font-weight:800;margin:12px 0 17px;color:#faf7f8}.rules-hero h1>span{color:var(--rw-red)}
.rules-hero p{max-width:620px;margin:0;color:#b7b3bc;font-size:15px;line-height:1.8;text-wrap:pretty}
.rules-hero-seal{width:124px;height:140px;flex:none;display:flex;align-items:center;justify-content:center;flex-direction:column;border:1px solid #6e424a;border-radius:60px 60px 25px 25px;color:#d399a0;transform:rotate(7deg);background:#331d242b;outline:1px solid #56323a;outline-offset:6px;margin:0 14px 0 0}
.rules-hero-seal span,.rules-hero-seal small{font:600 9px/1.4 ui-monospace,monospace;letter-spacing:.18em}.rules-hero-seal strong{font:400 72px/.95 Georgia,serif;margin:7px 0}
.rules-document-meta{display:flex;flex-wrap:wrap;gap:10px 25px;align-items:center;min-height:58px;padding:15px 0;border-top:1px solid #ffffff12;color:#a5a0aa;font-size:11px}.rules-document-meta>span{display:inline-flex;gap:5px;align-items:center}.rules-document-meta strong{color:#ddd8e0;font-weight:600}.rules-document-meta i{width:5px;height:5px;border-radius:50%;background:#81bda5;margin-right:4px}
.rules-workspace .rules-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0 28px;padding:0;border:0;background:none;border-radius:0}
.rules-workspace .rules-tab{position:relative;display:flex;align-items:center;gap:14px;min-width:0;padding:18px 20px;border:1px solid var(--rw-line);border-radius:12px;background:#151619;color:#c9c7ce;box-shadow:none;text-decoration:none;transition:border-color .18s,background .18s,transform .18s}
.rules-workspace .rules-tab:hover{border-color:#665059;background:#211c21;transform:translateY(-2px)}
.rules-workspace .rules-tab.active{border-color:#97505b;background:linear-gradient(120deg,#382027,#21191e);color:#fff;box-shadow:inset 0 1px #ffffff05}
.rules-tab-index{font:500 12px/1 ui-monospace,monospace;color:#9d7880}.rules-tab.active .rules-tab-index{color:#ff9ba4}
.rules-tab strong{display:block;font-size:14px;font-weight:700}.rules-tab small{display:block;margin-top:4px;font-size:11px;color:#aaa1ad;font-weight:400;white-space:normal}.rules-tab-arrow{margin-left:auto;font-size:20px;color:#82717b}.rules-tab.active .rules-tab-arrow{color:#f48b98}
.rules-workspace .rules-layout{display:grid;grid-template-columns:258px minmax(0,1fr);gap:26px;align-items:start}
.rules-workspace .rules-toc{position:sticky;top:92px;max-height:calc(100dvh - 112px);padding:20px 0 12px;background:#141518;border:1px solid var(--rw-line);border-radius:14px;box-shadow:none}
.rules-workspace .rules-toc-head{padding:0 18px 17px;border-color:var(--rw-line)}.rules-toc-head .eyebrow{font-size:9px;letter-spacing:.12em;color:#a79ba7}.rules-workspace .rules-toc-head h3{font-size:15px;letter-spacing:-.02em;margin-top:6px}.rules-workspace .rules-toc-count{border-color:#383039;background:#261d24;color:#dbadb6;font:500 11px ui-monospace,monospace}
.rules-workspace .rules-toc-list{display:grid;gap:4px;margin:12px 7px 14px;padding:0 4px;scrollbar-width:thin;scrollbar-color:#4a343d transparent}
.rules-workspace .rules-toc-link{grid-template-columns:24px minmax(0,1fr) auto;gap:9px;padding:11px 8px;border-radius:7px;color:#b7b2bd;min-width:0}
.rules-workspace .rules-toc-name{white-space:normal;overflow:visible;line-height:1.5;font-size:11px;font-weight:500}.rules-workspace .rules-toc-no{color:#9a8895;font-size:10px}.rules-workspace .rules-toc-rules{color:#9a8e9b;font:10px ui-monospace,monospace}
.rules-workspace .rules-toc-link:hover{background:#222126;color:#fff}.rules-workspace .rules-toc-link.active{border-color:#67404a;background:#352129;color:#fff}.rules-workspace .rules-toc-link.active .rules-toc-no{color:#ff8c99}
.rules-workspace .rules-top-button{width:calc(100% - 28px);margin:0 14px;padding:10px;border-color:#363038;background:#1b191e;color:#bfb3c1;font-size:11px}
.rules-workspace .rules-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:17px;padding:23px;background:linear-gradient(135deg,#1d1b20,#17171b);border:1px solid #39303a;border-radius:14px;box-shadow:none;margin:0}
.rules-search-wrap{min-width:0}.rules-workspace .rules-search-wrap label{display:flex;gap:8px;align-items:center;color:#eeebf1;font-size:14px;font-weight:650;letter-spacing:-.01em;margin:0 0 12px}.rules-search-icon{font-size:23px;color:var(--rw-red);line-height:1}
.rules-workspace .rules-search-row{display:flex;gap:8px}.rules-workspace .rules-search-row input{width:100%;min-width:0;height:44px;border:1px solid #49404b;border-radius:8px;background:#101014;color:#f5f0f7;font-size:13px;padding:0 13px;box-shadow:inset 0 2px 6px #0002}.rules-workspace .rules-search-row input::placeholder{color:#a097a7;opacity:1}
.rules-workspace .rules-search-row .btn{height:44px;background:#27222b;border-color:#49404b;color:#cbbdce;padding:0 13px;flex:none}
.rules-workspace .rules-toolbar-actions{display:flex;gap:6px;align-self:end;padding:0;flex-wrap:wrap}.rules-workspace .rules-toolbar-actions .btn{height:44px;padding:0 11px;background:#232026;border-color:#49404b;color:#d0c7d5;font-size:11px;white-space:nowrap}
.rules-workspace .rules-category-row{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:14px 0 0;border-top:1px solid #ffffff0b}
.rules-workspace .rules-category-chip{border:1px solid #3b343e;background:#211d25;border-radius:6px;color:#bfb2c6;padding:7px 11px;font-size:11px;font-weight:500}.rules-workspace .rules-category-chip.active{background:#4a2730;border-color:#92505c;color:#ffc2cb}.rules-workspace .rules-category-chip:hover{border-color:#c07380;color:#fff}
.rules-workspace .rules-result-line{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:17px 2px;color:#aaa0af;font-size:10px;line-height:1.6}.rules-result-line>span:first-child{color:#cabdce;font-weight:600}
.rules-workspace .portal-rules-content{display:grid;gap:18px;background:none;color:#e3dfe7}
.rules-workspace .portal-rules-content .rule-section{border:1px solid #37313c;border-radius:13px;background:#17161c;overflow:hidden;box-shadow:0 5px 22px #00000012;scroll-margin-top:92px}
.rules-workspace .portal-rules-content .section-head{display:flex;align-items:center;gap:16px;padding:21px 24px;background:linear-gradient(100deg,#251d25,#1b1920);border-bottom:1px solid #3c303c;cursor:pointer;transition:background .18s}
.rules-workspace .portal-rules-content .section-head:hover{background:#30212b}.rules-workspace .portal-rules-content .section-no{display:grid;place-items:center;flex:none;width:37px;height:37px;min-width:37px;border:1px solid #74414f;border-radius:9px;background:#44232f;color:#ffb2c0;font:500 13px ui-monospace,monospace}
.rules-workspace .portal-rules-content .section-head h2{color:#f2eaf4;font-size:17px;letter-spacing:-.025em;line-height:1.45;margin:0;font-weight:650}.rules-workspace .portal-rules-content .section-chevron{margin-left:auto;color:#c19bab;font-size:20px}
.rules-workspace .portal-rules-content .rule-item{padding:25px 26px;border:0;border-bottom:1px solid #ffffff0b;background:transparent;scroll-margin-top:94px;transition:background .18s}.rules-workspace .portal-rules-content .rule-item:last-child{border-bottom:0}.rules-workspace .portal-rules-content .rule-item:hover{background:#ffffff02}
.rules-workspace .portal-rules-content .rule-title{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 12px}.rules-workspace .portal-rules-content .rule-number{min-width:42px;padding:5px 7px;background:#2c222f;border:1px solid #4e374d;border-radius:5px;color:#eeb8cc;font:500 11px/1.2 ui-monospace,monospace}
.rules-workspace .portal-rules-content .rule-title h3{color:#ece5f0;font-size:15px;line-height:1.5;font-weight:650;letter-spacing:-.01em;margin:0;flex:1;min-width:120px}.rules-workspace .portal-rules-content .scope-tag,.rules-workspace .portal-rules-content .tag{font:500 9px/1.3 ui-monospace,monospace;letter-spacing:.04em;border:1px solid #4a3e51;border-radius:4px;background:#28222e;color:#b8a7c4;padding:4px 6px}
.rules-workspace .portal-rules-content .rule-body{max-width:78ch;color:#bfb5c8;font-size:14px;font-weight:400;line-height:1.9;overflow-wrap:anywhere}.rules-workspace .portal-rules-content .rule-body p{margin:9px 0;font-weight:400}.rules-workspace .portal-rules-content .rule-body p:first-child{margin-top:0}.rules-workspace .portal-rules-content .rule-body p:last-child{margin-bottom:0}.rules-workspace .portal-rules-content .rule-body strong{color:#eee4f1;font-weight:650}
.rules-workspace .portal-rules-content .tag.safe{background:#192d27;border-color:#36574a;color:#a6d6bf}.rules-workspace .portal-rules-content .tag.euclid{background:#332b1b;border-color:#66522d;color:#e5cb91}.rules-workspace .portal-rules-content .tag.keter{background:#361e28;border-color:#743d50;color:#efa6bc}
.rules-workspace .portal-rules-content .rule-body ul,.rules-workspace .portal-rules-content .rule-body ol{margin:12px 0;padding-left:22px}.rules-workspace .portal-rules-content .rule-body li{margin:6px 0;padding-left:3px}.rules-workspace .portal-rules-content .rule-body li::marker{color:#ce829a}
.rules-workspace .portal-rules-content .rule-permalink{order:5;margin-left:auto;flex:none;width:30px;height:30px;padding:0;display:grid;place-items:center;border:1px solid #473449;border-radius:6px;background:#29202d;color:#ce9cbd;opacity:.7;font-size:12px}.rules-workspace .portal-rules-content .rule-permalink:hover{opacity:1;background:#493047}
.rules-workspace .portal-rules-content .example-box,.rules-workspace .portal-rules-content .note-box,.rules-workspace .portal-rules-content .related-box,.rules-workspace .portal-rules-content .warning-box{margin:16px 0 3px;padding:14px 17px;border-radius:7px;line-height:1.8}
.rules-workspace .portal-rules-content .example-box{background:#1a2530;border:1px solid #314558;border-left:3px solid #719dbd;color:#bdcedd}.rules-workspace .portal-rules-content .note-box{background:#30291d;border:1px solid #5b4b30;border-left:3px solid #ccaa6b;color:#e1cba1}.rules-workspace .portal-rules-content .warning-box{background:#35212a;border:1px solid #68404e;border-left:3px solid #e6839c;color:#ebc2d1}.rules-workspace .portal-rules-content .related-box{background:#231e2a;border:1px solid #45354f;border-left:3px solid #a786be;color:#c8b6d6}.rules-workspace .portal-rules-content .related-box a{color:#e0bddf;text-decoration-color:#86627d;text-underline-offset:4px}
.rules-workspace .portal-rules-content .rule-item:target{background:#352330;box-shadow:inset 3px 0 #f38da6}.rules-workspace .rules-no-results{padding:35px 24px;border:1px dashed #705062;border-radius:12px;background:#211922;color:#dac4db;text-align:center}
.rules-workspace .rule-filter-hidden,.rules-workspace [hidden]{display:none!important}.rules-workspace .rule-section.collapsed .rule-items{display:none}.rules-workspace .rule-section.collapsed .section-head{border-bottom:0}
.rules-workspace :is(a,button,input,[role="button"]):focus-visible{outline:2px solid #ff9bad;outline-offset:4px}
@media(min-width:1450px){.rules-workspace .portal-rules-content .rule-body{margin-left:53px}}
@media(max-width:1200px){.rules-workspace .rules-layout{grid-template-columns:220px minmax(0,1fr);gap:18px}.rules-workspace .rules-toolbar{grid-template-columns:1fr}.rules-workspace .rules-toolbar-actions{justify-content:flex-end}.rules-workspace .rules-toolbar-actions .btn{height:32px}.rules-workspace .rules-category-row{padding-top:12px}.rules-workspace .rules-tab{padding:16px;gap:10px}}
@media(max-width:980px){.rules-workspace .rules-layout{grid-template-columns:1fr}.rules-workspace .rules-toc{position:relative;top:auto;max-height:none;padding:15px 0 10px}.rules-workspace .rules-toc-head{border:0;padding-bottom:4px}.rules-workspace .rules-toc-list{display:flex;overflow-x:auto;gap:6px;margin:8px 12px 0;padding-bottom:5px}.rules-workspace .rules-toc-link{display:flex;flex:0 0 auto;max-width:230px;width:auto;border:1px solid #37303c;background:#1d1922}.rules-workspace .rules-toc-name{font-size:11px}.rules-workspace .rules-toc-rules{display:none}.rules-workspace .rules-top-button{display:none}.rules-hero h1{font-size:48px}.rules-workspace .rules-toolbar{grid-template-columns:minmax(0,1fr) auto}.rules-workspace .rules-toolbar-actions .btn{height:44px}}
@media(max-width:680px){.rules-hero{padding:20px 20px 0;border-radius:14px}.rules-hero:before{left:20px}.rules-hero-top{font-size:8px;letter-spacing:.06em}.rules-document-id{display:none}.rules-hero-content{padding:28px 0 24px;gap:12px}.rules-kicker{font-size:8px;letter-spacing:.1em}.rules-hero h1{font-size:40px;margin:12px 0}.rules-hero p{font-size:12px;line-height:1.85}.rules-hero-seal{display:none}.rules-document-meta{gap:9px 16px;font-size:9px;padding:14px 0}.rules-workspace .rules-tabs{gap:6px;margin:12px 0 18px}.rules-workspace .rules-tab{display:flex;align-items:flex-start;flex-direction:column;gap:10px;padding:13px 10px;border-radius:9px}.rules-tab strong{font-size:12px}.rules-tab small{font-size:9px;line-height:1.5;margin-top:5px}.rules-tab-index{font-size:10px}.rules-tab-arrow{position:absolute;right:10px;top:7px;font-size:17px}.rules-workspace .rules-layout{gap:15px}.rules-workspace .rules-toolbar{padding:18px;gap:12px;grid-template-columns:1fr}.rules-workspace .rules-toolbar-actions{justify-content:flex-start}.rules-workspace .rules-toolbar-actions .btn{height:32px}.rules-workspace .rules-result-line{font-size:10px;margin:14px 2px}.rules-result-line>span:last-child{display:none}.rules-workspace .portal-rules-content .section-head{padding:17px;gap:12px}.rules-workspace .portal-rules-content .section-head h2{font-size:15px}.rules-workspace .portal-rules-content .section-no{width:32px;height:32px;min-width:32px;font-size:11px}.rules-workspace .portal-rules-content .rule-item{padding:20px 17px}.rules-workspace .portal-rules-content .rule-title{display:flex;gap:8px}.rules-workspace .portal-rules-content .rule-title h3{font-size:14px;min-width:calc(100% - 60px);flex:1}.rules-workspace .portal-rules-content .rule-number{min-width:39px;font-size:10px}.rules-workspace .portal-rules-content .rule-permalink{margin-left:auto}.rules-workspace .portal-rules-content .rule-body{font-size:13px;line-height:1.85}.rules-workspace .portal-rules-content .scope-tag,.rules-workspace .portal-rules-content .tag{font-size:8px}}
@media(prefers-reduced-motion:reduce){.rules-workspace *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
@media print{.rules-hero-seal,.rules-workspace .rules-tabs,.rules-workspace .rules-toc,.rules-workspace .rules-toolbar,.rules-workspace .rules-result-line,.rules-workspace .rule-permalink{display:none!important}.rules-workspace .rules-layout{display:block}.rules-workspace,.rules-workspace .rules-hero,.rules-workspace .rule-section,.rules-workspace .section-head,.rules-workspace .rule-item{background:#fff!important;color:#111!important;box-shadow:none!important}.rules-workspace :is(h1,h2,h3,p,li,strong,.rule-number,.rule-body){color:#111!important}.rules-workspace .rule-section.collapsed .rule-items{display:block}}
